In my document I have field called created like "2014-07-25T06:02:00", the mappings is:
created: {
format: dateOptionalTime
type: date
}
Here with the range query on that is fine, but why sort on that field I got:
{
error: ReduceSearchPhaseException[Failed to execute phase [query], [reduce] ]; nested: ClassCastException[java.lang.Long cannot be cast to org.apache.lucene.util.BytesRef];
status: 503
}
In my document I have field called created like "2014-07-25T06:02:00", the
mappings is:
created: {
format: dateOptionalTime
type: date
}
Here with the range query on that is fine, but why sort on that field I
got:
{
error: ReduceSearchPhaseException[Failed to execute phase [query], [reduce]
]; nested: ClassCastException[java.lang.Long cannot be cast to
org.apache.lucene.util.BytesRef];
status: 503
}
[2014-08-06 12:31:01,685][DEBUG][action.search.type ] [Maur-Konn] [
portal-boots-2014-08][0]: Failed to execute [org.elasticsearch.action.search
.SearchRequ
est@558af98a] while moving to second phase
java.lang.ClassCastException: java.lang.Long cannot be cast to org.apache.
lucene.util.BytesRef
at org.apache.lucene.util.BytesRef.compareTo(BytesRef.java:33)
at org.apache.lucene.search.FieldComparator.compareValues(
FieldComparator.java:221)
at org.elasticsearch.search.controller.ShardFieldDocSortedHitQueue.
lessThan(ShardFieldDocSortedHitQueue.java:118)
at org.elasticsearch.search.controller.ShardFieldDocSortedHitQueue.
lessThan(ShardFieldDocSortedHitQueue.java:35)
at org.apache.lucene.util.PriorityQueue.insertWithOverflow(
PriorityQueue.java:159)
at org.elasticsearch.search.controller.SearchPhaseController.
sortDocs(SearchPhaseController.java:360)
at org.elasticsearch.search.controller.SearchPhaseController.
sortDocs(SearchPhaseController.java:146)
at org.elasticsearch.action.search.type.
TransportSearchQueryThenFetchAction$AsyncAction.moveToSecondPhase(
TransportSearchQueryThenFetchAction.java:85)
at org.elasticsearch.action.search.type.
TransportSearchTypeAction$BaseAsyncAction.innerMoveToSecondPhase(
TransportSearchTypeAction.java:404)
at org.elasticsearch.action.search.type.
TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(
TransportSearchTypeAction.java:198)
at org.elasticsearch.action.search.type.
TransportSearchTypeAction$BaseAsyncAction$1.onResult(
TransportSearchTypeAction.java:174)
at org.elasticsearch.action.search.type.
TransportSearchTypeAction$BaseAsyncAction$1.onResult(
TransportSearchTypeAction.java:171)
at org.elasticsearch.search.action.SearchServiceTransportAction$23.
run(SearchServiceTransportAction.java:526)
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:744)
This is something to do with using multiple indexes as when i use the query
with the inquisitor plugin and a single index it works fine. Is there a
work around for this? This is causing a major problem in our production
environment.
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.