-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to specify "fields" in Elasticsearch request "SearchSource" struct #1454
Comments
After further search I seem to find the answer (provided by @olivere in another thread https://www.elastic.co/guide/en/elasticsearch/reference/5.2/breaking_50_search_changes.html#_literal_fields_literal_parameter):
However manually constructing the JSON struct and posting it directly to ES using curl works as expected using "fields" in Elastcisearch 7.x |
As stated here, this feature is in beta and probably has not too much to do with the thread mentioned above. It's a bit like |
Hey, checking to see if "fields" is still planning on being supported. There is a scenario that we must use |
This looks now stable and it seems it is also encouraged:
It would be nice for #1625 to get merged. |
Just chiming in that we could really use this too |
Which version of Elastic are you using?
[x ] elastic.v7 (for Elasticsearch 7.x)
[ ] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
I would like to achieve the following:
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html
However looking at the SearchSource struct I can only specify "doc_value" fields and "stored_fields" however I can't seem to find how to specify just "fields" field e.g. from the ES example:
The text was updated successfully, but these errors were encountered: