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

Comments

Projects
None yet
2 participants
@jpountz
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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 jpountz added bug labels Apr 17, 2014

jpountz added a commit to jpountz/elasticsearch that referenced this issue May 6, 2014

Remove RootMapper.validate and validate the routing key up-front.
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

Remove RootMapper.validate and validate the routing key up-front.
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 in 90b547c May 6, 2014

jpountz added a commit that referenced this issue May 6, 2014

Remove RootMapper.validate and validate the routing key up-front.
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

Remove RootMapper.validate and validate the routing key up-front.
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

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Remove RootMapper.validate and validate the routing key up-front.
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

Remove RootMapper.validate and validate the routing key up-front.
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
You can’t perform that action at this time.