Skip to content

Exact search (KNN) using SearchParams(exact=True) appears to have no effect on search results #1083

@AnisZakari

Description

@AnisZakari

Description:

Hello! Thank you for your excellent work on this project.

I'm working with a small document collection and need exact search (KNN) for accuracy. According to the documentation, this should be achievable using SearchParams:

knn_result = client.query_points(
    collection_name="arxiv-titles-instructorxl-embeddings",
    query=item["vector"],
    limit=k,
    search_params=models.SearchParams(
        exact=True,  # Turns on the exact search mode
    ),
).points

However, after running several tests, the exact=True parameter doesn't appear to change the search results.

Observations:

  1. QdrantLocal implementation: The search_params argument doesn't seem to be utilized in the query_points method of the QdrantLocal class (which handles QdrantClient(':memory:')). See [this line](

    search_params: Optional[types.SearchParams] = None,
    ).

  2. QdrantRemote implementation: The search_params argument appears to be used in the QdrantRemote class's query_points method. I tested this by instantiating the client with client = QdrantClient("http://localhost:6333"), but the search results remain identical regardless of whether search_params=models.SearchParams(exact=True) is specified or not.

Question:

Am I missing something in my implementation, or is there an issue with how the exact parameter is being processed?

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions