Getting Error while executing query String in Elasticsearch 6.1.1

"query": {
"query_string": {
"query": "herbal hills muslihills, 60 capsules",
"fields": ["br_nm^1.0", "c_nm^1.0", "fullName^1.0", "kp_*^1.0"],
"type": "best_fields",
"default_operator": "or",
"max_determinized_states": 10000,
"enable_position_increments": true,
"fuzziness": "AUTO",
"fuzzy_prefix_length": 0,
"fuzzy_max_expansions": 50,
"phrase_slop": 0,
"escape": false,
"auto_generate_synonyms_phrase_query": true,
"fuzzy_transpositions": true,
"boost": 1.0
}
},

Error:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[query_string] query does not support [auto_generate_synonyms_phrase_query]",
"line": 1,
"col": 431
}
],
"type": "parsing_exception",
"reason": "[query_string] query does not support [auto_generate_synonyms_phrase_query]",
"line": 1,
"col": 431
},
"status": 400
}

What is unclear in the error message?

[query_string] query does not support [auto_generate_synonyms_phrase_query]

Those fields are available in MultimatchQueryBuilder class,

Which client version? What does your pom.xml looks like?

Which server version? What gives GET /?

I am using Elasticsearch 6.1.1,

pom.xml

org.elasticsearch
elasticsearch
6.1.1



org.elasticsearch.client
transport
6.1.1

	>>>>>>>>>>>>>>>>>>>>>>>..

using tomcat 8.5

"auto_generate_synonyms_phrase_query" and
automatically generated for multi terms synonyms. Defaults to true

and getting the error while execiting the code

"root_cause": [
{
"type": "parsing_exception",
"reason": "[query_string] query does not support [auto_generate_synonyms_phrase_query]",
"line": 1,
"col": 431
}
],
"type": "parsing_exception",
"reason": "[query_string] query does not support [auto_generate_synonyms_phrase_query]",
"line": 1,
"col": 431
},
"status": 400
}

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

Also answer the second question please.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.