Why is my very simple ElasticSearch query failing, SearchPhaseExecutionException -
im trying search "dog chew" in invention-title field in patentgrants type.
query url: post http://localhost:9200/patents/patentgrants/_search
query body:
{ "query": { "match_all": { "invention-title": "dog chew" } } }
below picture of data in patents index , below picture of query , error message.
try this:
{ "query": { "match": { "inventiontitle": "dog chew" } } }
- the field name in screenshot
inventiontitle
notinvention-title
. - https://www.elastic.co/guide/en/elasticsearch/reference/1.6/query-dsl-match-all-query.html - use
match
instead ofmatch_all
.match_all
doesn't accept search query.
Comments
Post a Comment