Re: Fields with same name mapped differently in different types

2014-03-10 Thread morninlark
Thank you for your answer.
Renaming would create other problems for me, so I went with putting the
types in different indexes.



--
View this message in context: 
http://elasticsearch-users.115913.n3.nabble.com/Fields-with-same-name-mapped-differently-in-different-types-tp4051423p4051447.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/1394472077597-4051447.post%40n3.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fields with same name mapped differently in different types

2014-03-10 Thread Binh Ly
Unfortunately, no you can't do this at the moment. You'd have to make all 
your field types the same, or use different field names. If they are all in 
the same index in different types with different data types and same field 
names, you'll unfortunately encounter this limitation.

-- 
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/e0c06fab-1cba-4c89-8861-e905f6a8338f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fields with same name mapped differently in different types

2014-03-10 Thread morninlark
I also tried it with
{
  "query": {
"match_all": {}
  },
  "facets": {
"t2.stats": {
  "statistical": {
"field": "t2.sample_field"
  }
}
  }
}
but that results in the same error message.



--
View this message in context: 
http://elasticsearch-users.115913.n3.nabble.com/Fields-with-same-name-mapped-differently-in-different-types-tp4051423p4051431.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/1394462849181-4051431.post%40n3.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Fields with same name mapped differently in different types

2014-03-10 Thread morninlark
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.