Reputation: 33
I am trying to use elasticsearch (version 1.0) multimatch query with type set to cross_fields
like in the manual on elasticsearch page here:
the query looks like this (and it's exactly like on elasticsearch page):
{
"multi_match" : {
"query": "Robert Smith",
"type": "cross_fields",
"fields": [ "vorname", "familienname" ],
"operator": "and"
}
}
the index is created with jdbc river (with automatic mapping) plugin and working fine with other queries. When I delete the type: cross_fields
or change it for example to phrase_prefix
it's working fine. when I change it to the other type like most_fields
it's not working either. the error I am getting looks like this:
{
"error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[WXL5tNBeQB6tW0xLDPURRA][df_smsdata][3]: SearchParseException[[df_smsdata][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"multi_match\":{\"query\":\"Robert Smith\",\"type\":\"cross_fields\",\"fields\":[\"vorname\",\"familienname\"]}}}]]]; nested: QueryParsingException[[df_smsdata] **[multi_match] query does not support type cross_fields];** }{[WXL5tNBeQB6tW0xLDPURRA][df_smsdata][2]: SearchParseException[[df_smsdata][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"multi_match\":{\"query\":\"Robert Smith\",\"type\":\"cross_fields\",\"fields\":[\"vorname\",\"familienname\"]}}}]]]; nested: QueryParsingException[[df_smsdata] [multi_match] query does not support type cross_fields]; }{[WXL5tNBeQB6tW0xLDPURRA][df_smsdata][4]: SearchParseException[[df_smsdata][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"multi_match\":{\"query\":\"Robert Smith\",\"type\":\"cross_fields\",\"fields\":[\"vorname\",\"familienname\"]}}}]]]; nested: QueryParsingException[[df_smsdata] [multi_match] query does not support type cross_fields]; }{[WXL5tNBeQB6tW0xLDPURRA][df_smsdata][1]: SearchParseException[[df_smsdata][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"multi_match\":{\"query\":\"Robert Smith\",\"type\":\"cross_fields\",\"fields\":[\"vorname\",\"familienname\"]}}}]]]; nested: QueryParsingException[[df_smsdata] [multi_match] query does not support type cross_fields]; }{[WXL5tNBeQB6tW0xLDPURRA][df_smsdata][0]: SearchParseException[[df_smsdata][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"multi_match\":{\"query\":\"Robert Smith\",\"type\":\"cross_fields\",\"fields\":[\"vorname\",\"familienname\"]}}}]]]; nested: QueryParsingException[[df_smsdata] [multi_match] query does not support type cross_fields]; }]",
"status": 400
}
I can see the parsing exception that query does not support cross_fields
. is there something I have to set when creating the index?
Upvotes: 3
Views: 2014
Reputation: 703
In your linked documentation it says:
types of multi_match query
Note Added in 1.1.0.
Also mentioned in http://www.elasticsearch.org/blog/elasticsearch-1-1-0-released/
You will need to download the newer version.
Upvotes: 1