I am getting a weird exception[0] when doing a faceted search on an index
alias. I couldn't come up with a script that reproduces this behaviour.
This should be a cache invalidation issue because clearing the cache
fixes the problem and everything works as expected, perhaps inserting a
document on an aliased index (with a routing value) doesn't correctly
expire caches.
[0] ClassCastException
[org.elasticsearch.index.field.data.strings.SingleValueStringFieldData
cannot be cast to
org.elasticsearch.index.field.data.longs.LongFieldData]
Is there a chance that you did the query against an index that has no document with the mentioned field (thus no mapping)? In this case, the type of the field will be guessed to be "string" (we need to do that before we execute the query), and then, when you index a document with a numeric type, you will get this failure (and clear cache will fix it).
On Tuesday, March 13, 2012 at 3:46 PM, Christos Trochalakis wrote:
I am getting a weird exception[0] when doing a faceted search on an index
alias. I couldn't come up with a script that reproduces this behaviour.
This should be a cache invalidation issue because clearing the cache
fixes the problem and everything works as expected, perhaps inserting a
document on an aliased index (with a routing value) doesn't correctly
expire caches.
[0] ClassCastException
[org.elasticsearch.index.field.data.strings.SingleValueStringFieldData
cannot be cast to
org.elasticsearch.index.field.data.longs.LongFieldData]
On Wed, Mar 14, 2012 at 02:09:15PM +0200, Shay Banon wrote:
On Tuesday, March 13, 2012 at 3:46 PM, Christos Trochalakis wrote:
I am getting a weird exception[0] when doing a faceted search on an index
alias. I couldn't come up with a script that reproduces this behaviour.
This should be a cache invalidation issue because clearing the cache
fixes the problem and everything works as expected, perhaps inserting a
document on an aliased index (with a routing value) doesn't correctly
expire caches.
[0] ClassCastException
[org.elasticsearch.index.field.data.strings.SingleValueStringFieldData
cannot be cast to
org.elasticsearch.index.field.data.longs.LongFieldData]
Is there a chance that you did the query against an index that has no document with the mentioned field (thus no mapping)? In this case, the type of the field will be guessed to be "string" (we need to do that before we execute the query), and then, when you index a document with a numeric type, you will get this failure (and clear cache will fix it).
Yes, this is exactly the case. I just created a bug report
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.