Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support of dynamic efsearch and nprobs value during search for binary index #1769

Closed
heemin32 opened this issue Jun 24, 2024 · 4 comments

Comments

@heemin32
Copy link
Collaborator

Dynamic efsearch and nprobe is value during query time will be released in 2.16. One of its PR is #1707.

We are also implementing binary index support to be released in 2.16. One of the PR is #1747.

Both of them is not merged in main branch yet. When they are merged, we need to make sure that binary index also support dynamic efsearch and nprobe value.

@navneet1v
Copy link
Collaborator

@heemin32 the code is merged for ef_search and nprobes dynamic parameters. Does binary field has picked up the support?

@heemin32
Copy link
Collaborator Author

heemin32 commented Jul 18, 2024

YES for ef_search.
@junqiu-lei please check if nprobes parameter during query time will be applied for binary ivf index.

@junqiu-lei
Copy link
Member

YES for ef_search. @junqiu-lei please check if nprobes parameter during query time will be applied for binary ivf index.

The nprobes parameter support during query time isn't available in binary format feature branch.

Will check once #1784 merge to main

@junqiu-lei
Copy link
Member

Verified the dynamic nprobes is workable in query stage when use binary format IVF index:

http://localhost:9200/target-index/_search
{
  "size": 10,
  "query": {
    "knn": {
      "target-field": {
        "vector": [10],
        "k": 3,
        "method_parameters" : {
          "nprobes": 1
        },
        "filter": {
          "range": {
            "price": {
              "gte": 3,
              "lte": 5
            }
          }
        }
      }
    }
  }
}

Result:

{
    "took": 12,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 1,
            "relation": "eq"
        },
        "max_score": 0.5,
        "hits": [
            {
                "_index": "target-index",
                "_id": "1",
                "_score": 0.5,
                "_source": {
                    "target-field": [
                        2
                    ],
                    "price": 4.4
                }
            }
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants