-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Add ExistsQuery for finding all documents where a certain field exists #1833
Comments
Another approach could be to model with a separate field that has a keyword indicating that this data is present. This should perform better since don't need to iterate over the term dictionary and all the postings to accumulate a bitset eagerly at query time. You can then simply use a |
We should have an There are two ways to get this:
|
This has been demanded by several quickwit users already. (@PSeitz not sure why you want a fast field for this...) |
There are different ways/places where to store that information and fast field index already has that info. With the typing in columnar, you could also cover |
this exists now, as of #2160: though it doesn't seem like it supports the "optionally negated for a not exists" functionality mentioned above (in #1833 (comment)), which would be nice to have |
@williamh thank you for spotting this! Closing the issue. |
Sometimes it's necessary to find all documents that simply contain a field, regardless of its value
An ExistsQuery could be added that allows querying for documents containing a certain field.
Currently
RegexQuery::from_pattern(".*", field)?
can be used for this, and probably a RangeQuery for numeric fields.The text was updated successfully, but these errors were encountered: