i have an exception when i use 'query_string' to search with 'multi_field'
.
my docs is indexed by json
,like:{"region":"北京北京市海淀区","name":"群下子群|成员测试-82282","intra":"taipeng","geo":{"lon":116.3092,"lat":39.98364},"address":"泰鹏大厦"}
exception :org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to execute phase [query], all shards failed; shardFailures
{[C_c2mxBJS7KVuP2tcb1aIw][matrix][0]:
RemoteTransportException[[Auric][inet[/10.0.8.102:19300]][search/phase/query]];
nested: QueryPhaseExecutionException[[matrix][0]:
query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@6f26b9e7>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][4]:
QueryPhaseExecutionException[[matrix][4]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@43ececca>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][3]:
QueryPhaseExecutionException[[matrix][3]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@70e10093>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[C_c2mxBJS7KVuP2tcb1aIw][matrix][2]:
RemoteTransportException[[Auric][inet[/10.0.8.102:19300]][search/phase/query]];
nested: QueryPhaseExecutionException[[matrix][2]:
query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@577725b3>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][1]:
QueryPhaseExecutionException[[matrix][1]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@5fd068b>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:276)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:224)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$4.run(TransportSearchTypeAction.java:296)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Your mapping does not seem correct. Can you post the output of the get
mapping API instead? It appears that the region field might be a geo type
instead. Analyzed fields should have position data enabled by default.
i have an exception when i use 'query_string' to search with 'multi_field'
.
my docs is indexed by json
,like:{"region":"北京北京市海淀区","name":"群下子群|成员测试-82282","intra":"taipeng","geo":{"lon":116.3092,"lat":39.98364},"address":"泰鹏大厦"}
exception :org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to execute phase [query], all shards failed; shardFailures
{[C_c2mxBJS7KVuP2tcb1aIw][matrix][0]:
RemoteTransportException[[Auric][inet[/10.0.8.102:19300]][search/phase/query]];
nested: QueryPhaseExecutionException[[matrix][0]:
query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@6f26b9e7>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][4]:
QueryPhaseExecutionException[[matrix][4]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@43ececca>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][3]:
QueryPhaseExecutionException[[matrix][3]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@70e10093>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[C_c2mxBJS7KVuP2tcb1aIw][matrix][2]:
RemoteTransportException[[Auric][inet[/10.0.8.102:19300]][search/phase/query]];
nested: QueryPhaseExecutionException[[matrix][2]:
query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@577725b3>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][1]:
QueryPhaseExecutionException[[matrix][1]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@5fd068b>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:276)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:224)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$4.run(TransportSearchTypeAction.java:296)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Your mapping does not seem correct. Can you post the output of the get
mapping API instead? It appears that the region field might be a geo type
instead. Analyzed fields should have position data enabled by default.
--
Ivan
On Tue, Jul 22, 2014 at 8:46 PM, xu piao <xupi...@gmail.com <javascript:>>
wrote:
i have an exception when i use 'query_string' to search with
'multi_field' .
my docs is indexed by json
,like:{"region":"北京北京市海淀区","name":"群下子群|成员测试-82282","intra":"taipeng","geo":{"lon":116.3092,"lat":39.98364},"address":"泰鹏大厦"}
exception :org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to execute phase [query], all shards failed; shardFailures
{[C_c2mxBJS7KVuP2tcb1aIw][matrix][0]:
RemoteTransportException[[Auric][inet[/10.0.8.102:19300]][search/phase/query]];
nested: QueryPhaseExecutionException[[matrix][0]:
query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@6f26b9e7>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][4]:
QueryPhaseExecutionException[[matrix][4]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@43ececca>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][3]:
QueryPhaseExecutionException[[matrix][3]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@70e10093>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[C_c2mxBJS7KVuP2tcb1aIw][matrix][2]:
RemoteTransportException[[Auric][inet[/10.0.8.102:19300]][search/phase/query]];
nested: QueryPhaseExecutionException[[matrix][2]:
query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@577725b3>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }{[jwf1krq1QY27yqNt1_2vVQ][matrix][1]:
QueryPhaseExecutionException[[matrix][1]: query[filtered((region:"北京
西路"))->cache(_type:group)],from[0],size[20],sort[<custom:"geo":
org.elasticsearch.index.fielddata.fieldcomparator.GeoDistanceComparatorSource@5fd068b>]:
Query Failed [Failed to execute main query]]; nested:
IllegalStateException[field "region" was indexed without position data;
cannot run PhraseQuery (term=北京)]; }
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:276)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:224)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$4.run(TransportSearchTypeAction.java:296)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.