ClassCast when sorting on a long field (AtomicFieldData$WithOrdinals$1 cannot be cast to AtomicNumericFieldData)

This problem is really strange because my data has two long fields, and my
search/filter works for one of them but not the other.

Even weirder, I tried to create a curl reproducer for this with the exact
same data and that works fine!

Details here:

That shows the mapping of the auditEntry document type. It then shows two
queries, the first using "id" as the sort. This query fails with:

"QueryPhaseExecutionException[[apiman_manager][0]:
query[ConstantScore(cache(_type:auditEntry))],from[0],size[20],sort[<custom:
"id":
org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@730c1326>!]:
Query Failed [Failed to execute main query]]; nested:
ClassCastException[org.elasticsearch.index.fielddata.AtomicFieldData$WithOrdinals$1
cannot be cast to org.elasticsearch.index.fielddata.AtomicNumericFieldData];
"

The second is the same query but sorting on "createdOn". This query seems
to work fine.

Any help appreciated!

-Eric

PS: Originally found this using ES 1.3.2, but also tested using 1.3.8.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/28c75509-417d-4355-ac07-f20a30118b87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Also note: I'm using the java TransportClient to index the documents. I
get the ClassCast problem when querying using the TransportClient, but I
also get the error when querying
using http://localhost:9200/_plugin/marvel/sense/index.html.

fwiw

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/94305ece-3e91-403e-9fd6-44979be74ac5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.