-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
Initial Implementation of ExistsQuery #2160
Conversation
@imotov The approach is ok. I would
The other half of the ticket is to integrate this into the ExistsQuery of quickwit:
One tricky thing will be to test what happens when facing a fast field or when facing a dynamic field. |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2160 +/- ##
==========================================
+ Coverage 94.28% 94.42% +0.14%
==========================================
Files 320 322 +2
Lines 62469 63146 +677
==========================================
+ Hits 58896 59627 +731
+ Misses 3573 3519 -54
☔ View full report in Codecov by Sentry. |
3830aa5
to
5a618c1
Compare
I have implemented it to be consistent with other queries that I have seen. So, if field doesn't exists or not fast - it returns an error. I can see how returning nothing if the field doesn't exist might make sense, but it might also be pretty confusing. Returning nothing if field is not fast can be really confusing to users. |
src/query/exist_query.rs
Outdated
} | ||
|
||
impl ExistsQuery { | ||
#![allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#![allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we allow dead code? The compiler is informing you that there is no way to call this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah, I keep forgetting that pub use
thing.
Non-Existence should return an empty result on JSON fields, since they may be non-existing only on some segments. |
@PSeitz @imotov there is a bit of a semantic problem in our discussion. When we say the field is absent, we are talking of If it is not available, meaning resolve path has return |
@PSeitz, @fulmicoton so, the way it is implemented right now if you have a json field called |
Adds an implementation of ExistsQuery that takes advantage of fast fields. Fixes #2159 Co-authored-by: Paul Masurel <[email protected]>
82a1022
to
738d146
Compare
Not ready to be merged yet. Found some issues while trying to integrate it into quickwit. |
Turned out that the issue was in quickwit and not here. OK to merge. |
Implements ExistsQuery that returns all document where a field has some value.
Fixes #2159