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] ModelId should be optional for NeuralQuery #832

Open
jamesjhhan opened this issue Oct 14, 2024 · 1 comment
Open

[BUG] ModelId should be optional for NeuralQuery #832

jamesjhhan opened this issue Oct 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jamesjhhan
Copy link

What is the bug?

If the ModelId is not provided for a Neural query, it is considered conditionless and ignored. However, this is not a correct implementation since a default ModelId can be configured through a search pipeline.
https://opensearch.org/docs/latest/search-plugins/search-pipelines/neural-query-enricher/

How can one reproduce the bug?

Specify a NeuralQuery without the ModelId

What is the expected behavior?

If ModelId is not provided, it should execute the query.

What is your host/environment?

Windows, 10

Do you have any screenshots?

Do you have any additional context?

The fix I tested appears to be simple. Just update line 54 in NeuralQuery.cs to remove the "string.IsNullOrEmpty(q.ModelId) condition.

@jamesjhhan jamesjhhan added bug Something isn't working untriaged labels Oct 14, 2024
@dblock
Copy link
Member

dblock commented Oct 14, 2024

Much of this code is generated from spec. Check whether the spec for this field in https://github.com/opensearch-project/opensearch-api-specification is correct, if not that's where the fix should go. If it's not generated, contribute a fix to both with a unit test here?

@dblock dblock removed the untriaged label Oct 14, 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
Projects
None yet
Development

No branches or pull requests

2 participants