Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path-based routing doesn't work with doc values #5844

Closed
jpountz opened this issue Apr 17, 2014 · 1 comment
Closed

Path-based routing doesn't work with doc values #5844

jpountz opened this issue Apr 17, 2014 · 1 comment
Assignees
Labels
>bug :Search/Mapping Index mappings, including merging and defining field types v1.0.4 v1.1.2 v1.2.0 v2.0.0-beta1

Comments

@jpountz
Copy link
Contributor

jpountz commented Apr 17, 2014

If you use routing on a field that has doc values, you might hit a ClassCastException.

The reason is that RoutingFieldMapper does unchecked casts to the oal.document.Field class although for doc values we use classes that only implement oal.document.IndexableField.

@jpountz jpountz self-assigned this Apr 17, 2014
@jpountz
Copy link
Contributor Author

jpountz commented Apr 17, 2014

I think the issue is a bit more general, this field mapper makes too many assumptions about the data, eg. it assumes:

  • the the index field name is the same as the document field name,
  • the that string value of an index field is the same as its external value.

jpountz added a commit to jpountz/elasticsearch that referenced this issue May 6, 2014
RootMapper.validate was only used by the routing field mapper, which makes
buggy assumptions about how fields are indexed. For example, it assumes that
the index representation of a field is the same as its external representation.

Close elastic#5844
jpountz added a commit that referenced this issue May 6, 2014
RootMapper.validate was only used by the routing field mapper, which makes
buggy assumptions about how fields are indexed. For example, it assumes that
the index representation of a field is the same as its external representation.

Close #5844
@jpountz jpountz closed this as completed in 90b547c May 6, 2014
jpountz added a commit that referenced this issue May 6, 2014
RootMapper.validate was only used by the routing field mapper, which makes
buggy assumptions about how fields are indexed. For example, it assumes that
the index representation of a field is the same as its external representation.

Close #5844
jpountz added a commit that referenced this issue May 6, 2014
RootMapper.validate was only used by the routing field mapper, which makes
buggy assumptions about how fields are indexed. For example, it assumes that
the index representation of a field is the same as its external representation.

Close #5844
@clintongormley clintongormley added the :Search/Mapping Index mappings, including merging and defining field types label Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
RootMapper.validate was only used by the routing field mapper, which makes
buggy assumptions about how fields are indexed. For example, it assumes that
the index representation of a field is the same as its external representation.

Close elastic#5844
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
RootMapper.validate was only used by the routing field mapper, which makes
buggy assumptions about how fields are indexed. For example, it assumes that
the index representation of a field is the same as its external representation.

Close elastic#5844
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Mapping Index mappings, including merging and defining field types v1.0.4 v1.1.2 v1.2.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants