Hey there,

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
{
  "query": {
    "match_all": {}
  },
  "facets": {
    "stats": {
      "statistical": {
        "field": "sample_field"
      }
    }
  }
}

results in:
=> 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

Thank you!



--
View this message in context: 
http://elasticsearch-users.115913.n3.nabble.com/Fields-with-same-name-mapped-differently-in-different-types-tp4051423.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1394455870429-4051423.post%40n3.nabble.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to