-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
msearch does not support an empty first line #39841
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In documentation we are saying that `_msearch` can use empty headers such as: ``` {} { "query": {"match_all": {}}} { "query": {"match_all": {}}} { "query": {"match_all": {}}} { "query": {"match_all": {}}} ``` This is true but not for the very first line of the request. See this example: ``` DELETE /test PUT /test/_doc/1 { "foo": "bar" } ``` Running: ``` $ cat requests ``` ``` {} { "query": {"match_all": {}}} { "query": {"match_all": {}}} { "query": {"match_all": {}}} { "query": {"match_all": {}}} ``` ``` curl -H "Content-Type: application/x-ndjson" -XGET "http://127.0.0.1:9200/test/_msearch?pretty" --data-binary "@requests"; echo ``` Works well. But running with: ``` $ cat requests ``` ``` { "query": {"match_all": {}}} { "query": {"match_all": {}}} { "query": {"match_all": {}}} { "query": {"match_all": {}}} ``` Gives: ```json { "error" : { "root_cause" : [ { "type" : "parsing_exception", "reason" : "Expected [START_OBJECT] but found [null]", "line" : 1, "col" : 0 } ], "type" : "parsing_exception", "reason" : "Expected [START_OBJECT] but found [null]", "line" : 1, "col" : 0 }, "status" : 400 } ``` Related discussion: https://discuss.elastic.co/t/sending-multiple-count-requests-in-one-go/171456/14
dadoonet
added
>docs
General docs changes
:Search/Search
Search-related issues that do not fall into other categories
labels
Mar 8, 2019
Pinging @elastic/es-search |
javanna
added a commit
to javanna/elasticsearch
that referenced
this pull request
Apr 9, 2019
I consider this a bug, I don't like that we need to amend the docs by saying "we allow this, but not on the first line". I tried to address this in #41011 , though there is a downside, see the PR to know more ;) |
Closing this in favour of #41011 |
javanna
added a commit
that referenced
this pull request
May 1, 2019
With #41442 we have deprecated support for empty line before any action metadata in msearch API. With this commit we remove support for such empty line, in place of parsing it as empty action metadata, which was previously not supported although the following items could have an empty line representing their corresponding action metadata. This way we make all times equal. Relates to #39841
akhil10x5
pushed a commit
to akhil10x5/elasticsearch
that referenced
this pull request
May 2, 2019
With elastic#41442 we have deprecated support for empty line before any action metadata in msearch API. With this commit we remove support for such empty line, in place of parsing it as empty action metadata, which was previously not supported although the following items could have an empty line representing their corresponding action metadata. This way we make all times equal. Relates to elastic#39841
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this pull request
May 27, 2019
With elastic#41442 we have deprecated support for empty line before any action metadata in msearch API. With this commit we remove support for such empty line, in place of parsing it as empty action metadata, which was previously not supported although the following items could have an empty line representing their corresponding action metadata. This way we make all times equal. Relates to elastic#39841
23 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>docs
General docs changes
:Search/Search
Search-related issues that do not fall into other categories
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In documentation we are saying that
_msearch
can use empty headers:This is true but not for the very first line of the request.
See this example:
Running:
Works well.
But running with:
Gives:
Related discussion: https://discuss.elastic.co/t/sending-multiple-count-requests-in-one-go/171456/14