Method
_mk_query_args
(
self, query, query_params: Optional[Dict[str, Union[str, int, float, bytes]]]
)
Source from the content-addressed store, hash-verified
| 1233 | return args |
| 1234 | |
| 1235 | def _mk_query_args( |
| 1236 | self, query, query_params: Optional[Dict[str, Union[str, int, float, bytes]]] |
| 1237 | ): |
| 1238 | args = [self.index_name] |
| 1239 | |
| 1240 | if isinstance(query, str): |
| 1241 | # convert the query from a text to a query object |
| 1242 | query = Query(query) |
| 1243 | if not isinstance(query, Query): |
| 1244 | raise ValueError(f"Bad query type {type(query)}") |
| 1245 | |
| 1246 | args += query.get_args() |
| 1247 | args += self.get_params_args(query_params) |
| 1248 | |
| 1249 | return args, query |
| 1250 | |
| 1251 | def search( |
| 1252 | self, |
Tested by
no test coverage detected