Sorting on not_analyzed field defined for multiple index types

Hi all,

We have defined a field in multiple index types having the same name. When
sorting on that field in a query, the following error occurs:

Can't sort on string types with more than one value per doc, or more than

one token per field

The problem seems to be that in one index type the field has one value, and
in the other it has multiple.

To recreate our problem, see the code in the following gist:

We've
read http://elasticsearch-users.115913.n3.nabble.com/not-analyzed-attribute-gt-Can-t-sort-on-string-types-with-more-than-one-value-per-doc-or-more-than-od-td3848413.html#none
and understand the issue, in which Kimchy clearly states that: "Same named
fields across different types need to have the same type / index behavior
when sorting / faceting on them, so thats the problem."
But in our case, we explicitly search only on the index type that has
single values, which means sorting should work. It doesn't seem to matter
if we explicitly specify the index type in the URL or in the query itself
in the form of a type filter.

Is this intended behaviour of ElasticSearch? Is there a way around this?

Cheers,
Jippe Holwerda
Frank Evers

--
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.
For more options, visit https://groups.google.com/groups/opt_out.