Executes when a search is performed on the store.
query(
self,
query_vector: Union[List[float], None],
query: Union[str, None],
*,
k: int,
fetch_k: int,
vector_query_field: str,
text_field: str,
filter: List[dict],
similarity: Union[DistanceStrategy, None]
) -> Dict| Name | Type | Description |
|---|---|---|
query_vector* | Union[List[float], None] | The query vector, or None if not using vector-based query. |
query* | Union[str, None] | The text query, or None if not using text-based query. |
k* | int | The total number of results to retrieve. |
fetch_k* | int | The number of results to fetch initially. |
vector_query_field* | str | The field containing the vector representations in the index. |
text_field* | str | The field containing the text data in the index. |
filter* | List[dict] | List of filter clauses to apply to the query. |
similarity* | Union[DistanceStrategy, None] | The similarity strategy to use, or None if not using one. |