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

Invalid "ElasticSearchIllegalArgumentException[The required text option is missing]" Error #3247

Closed
toastdriven opened this Issue Jun 26, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@toastdriven

toastdriven commented Jun 26, 2013

If I precisely follow the docs & send the following, I get a successful request (200).

curl -XPOST 'localhost:9200/_search' -d '{
  "query": {
    "query_string": {
        "query": "hello"
    }
  },
  "suggest": {
    "suggest": {
      "text": "*:*",
      "term": {
        "field": "_all"
      }
    }
  }
}'

However, if I just change the ordering of the text & term keys, I get the "Required text option is missing error" (& a resulting HTTP 500), even though it is present in the JSON. AFAICT, the ordering within the JSON object shouldn't matter.

curl -XPOST 'localhost:9200/_search' -d '{
  "query": {
    "query_string": {
        "query": "hello"
    }
  },
  "suggest": {
    "suggest": {
      "term": {
        "field": "_all"
      },
      "text": "*:*"
    }
  }
}'

@ghost ghost assigned spinscale Jun 27, 2013

spinscale added a commit to spinscale/elasticsearch that referenced this issue Jun 27, 2013

Dont execute suggest before parsing the full request
The current implementation of parsing suggestions executed inside of the
the pull parser - which resulted in being reliable of the order of the
elements in the request. This fix changes the behaviour to parse the
relevant parts of the request first and then execute all the suggestions
afterwards, so we can be sure that every information has been extracted
from the request before execution.

Closes elastic#3247

@spinscale spinscale closed this in 0a50ed0 Jun 28, 2013

spinscale added a commit that referenced this issue Jun 28, 2013

Dont execute suggest before parsing the full request
The current implementation of parsing suggestions executed inside of the
the pull parser - which resulted in being reliable of the order of the
elements in the request. This fix changes the behaviour to parse the
relevant parts of the request first and then execute all the suggestions
afterwards, so we can be sure that every information has been extracted
from the request before execution.

Closes #3247

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Dont execute suggest before parsing the full request
The current implementation of parsing suggestions executed inside of the
the pull parser - which resulted in being reliable of the order of the
elements in the request. This fix changes the behaviour to parse the
relevant parts of the request first and then execute all the suggestions
afterwards, so we can be sure that every information has been extracted
from the request before execution.

Closes elastic#3247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment