Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

field "tags" was indexed without position data; cannot run PhraseQuery #4475

Closed
tinytub opened this issue Dec 17, 2013 · 3 comments
Closed

Comments

@tinytub
Copy link

tinytub commented Dec 17, 2013

Yestoday I update ES to 0.90.7 and logstash to 1.3.1
use kibana filter with tag I get these error

[2013-12-17 11:42:29,128][DEBUG][action.search.type ] [node-10.7.3.121] [logstash-2013.12.17][3], node[aLYmR50MR_W0cQdMGG8Uxw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@51fc89c6]
org.elasticsearch.transport.RemoteTransportException: [node-10.7.3.122][inet[/10.7.3.122:9300]][search/phase/query]
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2013.12.17][3]: query[filtered(ConstantScore(:))->BooleanFilter(+: +cache(@timestamp:[1387165326783 TO 1387251749031]) +cache(QueryWrapperFilter(+(tags:"syq yxg") +(tags:apache))) +BooleanFilter(+:))],from[0],size[500],sort[<custom:"@timestamp": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@684f9f43>!]: Query Failed [Failed to execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:123)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:623)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:612)
at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:270)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IllegalStateException: field "tags" was indexed without position data; cannot run PhraseQuery (term=syq)
at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:311)
at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:587)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:539)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:112)

how to fix it ?

@ydnitin
Copy link

ydnitin commented Dec 17, 2013

I am stuck in the same situation. It seems to be applying default template which I don't want it to. I have rolled back to logstash-1.1.13. Dropped the latest index but it creates a new one with default template.
I stick this index.mapper.dynamic: false in elasticsearch.yml and restarted elasticsearch it creates a new index with no default template but rest of my indexes becomes useless.

Kibana throws this error
"Oops! IllegalStateException[field "type" was indexed without position data"

I can't seem to find out where it's picking up the default template from?

@N-Mi
Copy link

N-Mi commented Jan 14, 2014

I have the same issue (ES 0.90.7 and last logstash build 1.4.0-dev).

On syslog messages, Kibana thows this error on field "host" and "facility", but not "program" or some other custom fields I tested.

Copy paste of error message in elasticsearch.log :

[2014-01-14 10:46:51,240][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][1], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3fe72c9c]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][1]: query[ConstantScore(*:*)],from[0],size[0]: Query Failed [Failed to execute global facets]
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:188)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:131)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toSafeBits(DocIdSets.java:130)
    at org.elasticsearch.common.lucene.search.FilteredCollector.setNextReader(FilteredCollector.java:69)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:309)
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:186)
    ... 10 more
[2014-01-14 10:46:51,249][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][0], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3fe72c9c]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][0]: query[ConstantScore(*:*)],from[0],size[0]: Query Failed [Failed to execute global facets]
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:188)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:131)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toSafeBits(DocIdSets.java:130)
    at org.elasticsearch.common.lucene.search.FilteredCollector.setNextReader(FilteredCollector.java:69)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:309)
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:186)
    ... 10 more
[2014-01-14 10:46:51,282][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][2], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@502fcd07]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][2]: query[filtered(ConstantScore(*:*))->BooleanFilter(+cache(QueryWrapperFilter((tags:backbone))) +cache(@timestamp:[1389692812416 TO 1389696411250]) +cache(QueryWrapperFilter((facility:"syslog 6 info"))) -cache(QueryWrapperFilter((tags:noise))))],from[0],size[500],sort[<custom:"@timestamp": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@519fc4c6>!]: Query Failed [Failed to execute main query]
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:123)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:587)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:539)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:112)
    ... 9 more
[2014-01-14 10:46:51,286][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][1], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@502fcd07]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][1]: query[filtered(ConstantScore(*:*))->BooleanFilter(+cache(QueryWrapperFilter((tags:backbone))) +cache(@timestamp:[1389692812416 TO 1389696411250]) +cache(QueryWrapperFilter((facility:"syslog 6 info"))) -cache(QueryWrapperFilter((tags:noise))))],from[0],size[500],sort[<custom:"@timestamp": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@723dafb1>!]: Query Failed [Failed to execute main query]
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:123)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:587)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:539)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:112)
    ... 9 more
[2014-01-14 10:46:51,289][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][3], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3fe72c9c]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][3]: query[ConstantScore(*:*)],from[0],size[0]: Query Failed [Failed to execute global facets]
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:188)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:131)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toSafeBits(DocIdSets.java:130)
    at org.elasticsearch.common.lucene.search.FilteredCollector.setNextReader(FilteredCollector.java:69)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:309)
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:186)
    ... 10 more
[2014-01-14 10:46:51,290][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][3], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@502fcd07]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][3]: query[filtered(ConstantScore(*:*))->BooleanFilter(+cache(QueryWrapperFilter((tags:backbone))) +cache(@timestamp:[1389692812416 TO 1389696411250]) +cache(QueryWrapperFilter((facility:"syslog 6 info"))) -cache(QueryWrapperFilter((tags:noise))))],from[0],size[500],sort[<custom:"@timestamp": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@2fd9c80f>!]: Query Failed [Failed to execute main query]
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:123)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:587)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:539)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:112)
    ... 9 more
[2014-01-14 10:46:51,292][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][4], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@502fcd07]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][4]: query[filtered(ConstantScore(*:*))->BooleanFilter(+cache(QueryWrapperFilter((tags:backbone))) +cache(@timestamp:[1389692812416 TO 1389696411250]) +cache(QueryWrapperFilter((facility:"syslog 6 info"))) -cache(QueryWrapperFilter((tags:noise))))],from[0],size[500],sort[<custom:"@timestamp": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@2dd6954>!]: Query Failed [Failed to execute main query]
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:123)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:587)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:539)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:112)
    ... 9 more
[2014-01-14 10:46:51,293][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][4], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3fe72c9c]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][4]: query[ConstantScore(*:*)],from[0],size[0]: Query Failed [Failed to execute global facets]
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:188)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:131)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toSafeBits(DocIdSets.java:130)
    at org.elasticsearch.common.lucene.search.FilteredCollector.setNextReader(FilteredCollector.java:69)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:309)
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:186)
    ... 10 more
[2014-01-14 10:46:51,295][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][2], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3fe72c9c]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][2]: query[ConstantScore(*:*)],from[0],size[0]: Query Failed [Failed to execute global facets]
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:188)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:131)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toSafeBits(DocIdSets.java:130)
    at org.elasticsearch.common.lucene.search.FilteredCollector.setNextReader(FilteredCollector.java:69)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:309)
    at org.elasticsearch.search.facet.FacetPhase.execute(FacetPhase.java:186)
    ... 10 more
[2014-01-14 10:46:51,296][DEBUG][action.search.type       ] [Timberius] All shards failed for phase: [query]
[2014-01-14 10:46:51,294][DEBUG][action.search.type       ] [Timberius] [logstash-2014.01.14][0], node[NwuY3JOmTJ2ifkmfW29DHA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@502fcd07]
org.elasticsearch.search.query.QueryPhaseExecutionException: [logstash-2014.01.14][0]: query[filtered(ConstantScore(*:*))->BooleanFilter(+cache(QueryWrapperFilter((tags:backbone))) +cache(@timestamp:[1389692812416 TO 1389696411250]) +cache(QueryWrapperFilter((facility:"syslog 6 info"))) -cache(QueryWrapperFilter((tags:noise))))],from[0],size[500],sort[<custom:"@timestamp": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@162e0b44>!]: Query Failed [Failed to execute main query]
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:123)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:229)
    at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
    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.performFirstPhase(TransportSearchTypeAction.java:203)
    at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalStateException: field "facility" was indexed without position data; cannot run PhraseQuery (term=syslog)
    at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:273)
    at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
    at org.elasticsearch.common.lucene.docset.DocIdSets.toCacheable(DocIdSets.java:79)
    at org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache$FilterCacheFilterWrapper.getDocIdSet(WeightedFilterCache.java:171)
    at org.elasticsearch.common.lucene.search.XBooleanFilter.getDocIdSet(XBooleanFilter.java:83)
    at org.elasticsearch.common.lucene.search.ApplyAcceptedDocsFilter.getDocIdSet(ApplyAcceptedDocsFilter.java:45)
    at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:131)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
    at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:167)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:587)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:539)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:112)
    ... 9 more
[2014-01-14 10:46:51,298][DEBUG][action.search.type       ] [Timberius] All shards failed for phase: [query]

@s1monw
Copy link
Contributor

s1monw commented Jan 14, 2014

I guess that is due to a set index_option on those fields. If they are not_analyzed the index_option defaults to docs and not to positions which means you can not execute phrase queries on them. The only way to resolve this is to reindex with index_option set to positions (see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html) but I doubt that this is useful on a field that is not_analyzed

@s1monw s1monw closed this as completed Jan 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants