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

[BUG] Neural query modelId is not nullable when used in nested query #15034

Closed
marcus-bcl opened this issue Jul 31, 2024 · 3 comments
Closed
Labels
bug Something isn't working Search Search query, autocomplete ...etc

Comments

@marcus-bcl
Copy link

Describe the bug

Using the neural_query_enricher processor in a search pipeline allows you to set the default model_id for a neural query.

However, when trying to use a nested query containing a neural query (e.g. for chunked text embeddings), it still requires you to provide the model_id.

Related component

Search

To Reproduce

  1. Create an indexed with a nested knn field.
  2. Add a search pipeline with a default_model_id, as per https://opensearch.org/docs/latest/search-plugins/semantic-search/#setting-a-default-model-on-an-index-or-field
  3. Perform a nested query e.g.
GET /my-index/_search
{
  "query": {
    "nested": {
      "score_mode": "max",
      "path": "text_embedding",
      "query": {
        "neural": {
          "text_embedding.knn": {
            "query_text": "my query text"
          }
        }
      }
    }
  }
}
  1. 500 Error is returned:
[HTTP/1.1 500 Internal Server Error]
{"error":{"root_cause":[{"type":"null_pointer_exception","reason":"modelId is marked non-null but is null"}],"type":"null_pointer_exception","reason":"modelId is marked non-null but is null"},"status":500}

Expected behavior

Expect a 200 response with search results

Additional Details

Plugins
ml

Host/Environment (please complete the following information):

  • Amazon OpenSearch 2.13
@marcus-bcl marcus-bcl added bug Something isn't working untriaged labels Jul 31, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Jul 31, 2024
@getsaurabh02
Copy link
Member

@vibrantvarun do you want to verify this and take a stab?

@msfroh
Copy link
Collaborator

msfroh commented Jul 31, 2024

I think this was fixed by #14739 (opened in response to opensearch-project/neural-search#813).

@marcus-bcl
Copy link
Author

Great news, sounds like this will be fixed in 2.16. Apologies, I did do a search beforehand but didn't find that existing bug.

I'll close this bug as a duplicate of opensearch-project/neural-search#813 - thanks!

@marcus-bcl marcus-bcl closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Search Project Board Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Search Search query, autocomplete ...etc
Projects
Archived in project
Development

No branches or pull requests

3 participants