-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Fix range and wildcard queries on type-field for single-type indices #31632
Comments
Pinging @elastic/es-search-aggs |
Talked about this in the group, while supporting |
With the introduction of single types in 6.x, the `_type` field is no longer indexed, which leads to certain queries that were working before throw errors now. One such query is the `range` query, that, if performed on a single typer index, currently throws an IAE since the field is not indexed. This change adds special treatment for this case in the TypeFieldMapper, comparing the range queries lower and upper bound to the one existing type and either returns a MatchAllDocs or a MatchNoDocs query. Relates to elastic#31632 Closes elastic#31476
With the introduction of single types in 6.x, the `_type` field is no longer indexed, which leads to certain queries that were working before throw errors now. One such query is the `range` query, that, if performed on a single typer index, currently throws an IAE since the field is not indexed. This change adds special treatment for this case in the TypeFieldMapper, comparing the range queries lower and upper bound to the one existing type and either returns a MatchAllDocs or a MatchNoDocs query. Relates to #31632 Closes #31476
…31756) With the introduction of single types in 6.x, the `_type` field is no longer indexed, which leads to certain queries that were working before throw errors now. One such query is the `range` query, that, if performed on a single typer index, currently throws an IAE since the field is not indexed. This change adds special treatment for this case in the TypeFieldMapper, comparing the range queries lower and upper bound to the one existing type and either returns a MatchAllDocs or a MatchNoDocs query. Relates to elastic#31632 Closes elastic#31476
…32161) With the introduction of single types in 6.x, the `_type` field is no longer indexed, which leads to certain queries that were working before throw errors now. One such query is the `range` query, that, if performed on a single typer index, currently throws an IAE since the field is not indexed. This change adds special treatment for this case in the TypeFieldMapper, comparing the range queries lower and upper bound to the one existing type and either returns a MatchAllDocs or a MatchNoDocs query. Relates to #31632 Closes #31476
@cbuescher I'm wondering if it’s worth still keeping this open, or if we should close it. In 7.0 it is deprecated to use |
@jtibshirani agreed, since we are moving close to 7.0 and there hasn't been much outside need to fix this since when I opened it last year, I think we can close the issue. If this limitation gets raised from a user side we can still re-evaluate considering the context. |
This comes from a discussion with @jpountz after looking at #31476.
Range and wildcard queries throw an error when run against a
_type
field for single-type indices in 6.x and most likely alsoin master. While
_type
is deprecated, it might still we worth fixing these for the time being. In the other hand it seems to be arare use-case to query the
_type
field with arange
query, so I'd probably discuss this before diving deeper into it.The text was updated successfully, but these errors were encountered: