I have one index containing various types. It does happen, that a field with the same name is mapped as string in one type and as integer in another type.
The following query on a type t1, where "sample_field" is mapped as string
=> FacetPhaseExecutionException[Facet [stats]: field [sample_field] isn't a number field, but a string]
which is of course the expected feedback
The same query a type t2, where "sample_field" is mapped as integer, leads to the following error:
=> NumberFormatException[Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]
I know I could either rename the fields or put the types in different indexes to avoid this error.
I want to keep the mappings as they are.
Is there a more elegant way to solve this issue?
I am using elasticsearch version 0.90.7