Below given is my code:
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(QueryBuilders.matchQuery("field", "value to search"));
Search search = new Search.Builder(searchSourceBuilder.toString()).build();
JestResult result = jestc.execute(search);
While running this code it gives exception: {"error":{"root_cause":[{"type":"parsing_exception","reason":"[match] query does not support [auto_generate_synonyms_phrase_query]","line":1,"col":213}],"type":"parsing_exception","reason":"[match] query does not support [auto_generate_synonyms_phrase_query]","line":1,"col":213},"status":400}
Need help to resolve this issue.... Tried match_all query and it worked. No idea why this is failing.
I am using "org.elasticsearch" and "org.elasticsearch.client" of 6.1.1 version and jest version is 5.3.3. Not sure if it matters.
Thanks in advance