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 Request] I have multiple knn_vector fields with settings.index.knn set to true, but it would be ideal if certain fields could use approximate k-NN search while others could only use exact k-NN. #2270

Open
bcc829 opened this issue Nov 12, 2024 · 4 comments

Comments

@bcc829
Copy link

bcc829 commented Nov 12, 2024

Is your feature request related to a problem? Please describe

In my index, I have two knn_vector fields with settings.index.knn set to true, but I want one field to use approximate k-NN search while the other only uses exact k-NN. The field not using approximate k-NN is consuming a lot of memory. It would be ideal if I could configure the use of approximate k-NN on a per-field basis.

Describe the solution you'd like

It would be nice if it could be set for each field as shown below.

{
  "settings": {
    "index": {
      "knn": true,
    }
  },
  "mappings": {
    "properties": {
      "vector1": {
        "type": "knn_vector",
        "dimension": 2,
        "index": "false"
      },
      "vector2": {
        "type": "knn_vector",
        "dimension": 4,
        "index": "false"
      }
    }
  }
}

Related component

Search

Describe alternatives you've considered

No response

Additional context

No response

@bcc829 bcc829 changed the title [Feature Request] In my index, I have two knn_vector fields with settings.index.knn set to true, but I want one field to use approximate k-NN search while the other only uses exact k-NN. [Feature Request] I have multiple knn_vector fields with settings.index.knn set to true, but it would be ideal if certain fields could use approximate k-NN search while others could only use exact k-NN. Nov 12, 2024
@sandeshkr419
Copy link

sandeshkr419 commented Nov 13, 2024

Does this belongs in k-nn repo - https://github.com/opensearch-project/k-NN/

cc - @navneet1v

@navneet1v
Copy link
Collaborator

navneet1v commented Nov 13, 2024

@sandeshkr419
yes this belongs to k-NN.

@bcc829 there are already some github issues created for to exactly solve this problem: #1079, #1078

Please do a +1 on the issue and also add your use case so that it can be priortized.

cc: @vamshin

@vamshin
Copy link
Member

vamshin commented Nov 13, 2024

@sandeshkr419 do you have permissions to move this to k-NN repo?

@sandeshkr419
Copy link

I don't have permissions to move, but @prudhvigodithi mentioned in triage meeting that he can move it (probably maintainer's permissions).

@prudhvigodithi Can you please move this to k-NN plugin?

(I'll add back the untriage label so that k-NN group can acknowledge it)

@prudhvigodithi prudhvigodithi transferred this issue from opensearch-project/OpenSearch Nov 13, 2024
@navneet1v navneet1v moved this from Backlog to Backlog (Hot) in Vector Search RoadMap Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Status: Backlog (Hot)
Development

No branches or pull requests

4 participants