-
Notifications
You must be signed in to change notification settings - Fork 620
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
Request parsing of terms query not working as expected #830
Labels
Comments
I am attaching a small program that illustrates the issue: |
reijnden
changed the title
Request parsing of terms query seems of
Request parsing of terms query not working as expected
Mar 22, 2024
Thank you for reporting this! This is indeed a bug in the deserialization logic where I've got a fix in the works, I'll update this issue once I've tested this further. |
Sure, you're welcome. Anything I can do let me know. |
mdelapenya
added a commit
to mdelapenya/go-elasticsearch
that referenced
this issue
Apr 24, 2024
* main: adding changelog for 8.13.1 (elastic#847) Add put_synonym_rule fix (elastic#843) add PoolCompressor option and pass it to elastictransport.Config (elastic#840) adding changelog for 8.13.0 (elastic#838) Bump elastictransport to v8.5.0 (elastic#835) Fixes elastic#830 (elastic#833) Update apis for 8.14 (elastic#831)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In our project we try to parse a search request with the typedAPI as follows
request, err := search.NewRequest().FromJSON(jsonstr) if err != nil { log.Errorf("failed to create request 1: " + err.Error()) return nil, err }
When we send a bool query with filter on terms, the terms part is being ignored. For example this query
{ "query": { "bool": { "filter": [ { "terms": { "Fields.lcf": [ "bifd", "xxx" ] } } ], "must": { "multi_match": { "query": "possibility", "fields": [ "Text", "Title^3" ] } } } } }
The resulting request does not hold the full terms section. It will be
terms: {}
Now if I change the input query as below it works, but this is obviously not a valid query to send to Elastic
{ "query": { "bool": { "filter": [ { "terms": { "TermsQuery": { "Fields.lcf": [ "bifd", "xxx" ] } } } ], "must": { "multi_match": { "query": "possibility", "fields": [ "Text", "Title^3" ] } } } } }
Am i missing something or is the API buggy here?
Thanks
The text was updated successfully, but these errors were encountered: