-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Adds SpanGapQueryBuilder. Feature #27862 #28636
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Hi @Chandan83, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile? |
@jimczi I had already signed CLA before submitting. Do you match anything other than github username? |
@karmi I have added the email which was used during commit to my github profile. |
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
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.
Thanks @Chandan83 !
The approach looks good to me. I'd remove the field
parameter of the span_gap
, it's needed for the other span_query
but I think we can omit it for gaps.
I agree that it's not ideal that we need to wait to build the final Lucene query to fail a request that contains a span_gap
in a wrong place but I can live with it.
@jpountz any thoughts about this leniency ?
@jimczi If the approach is fine, I would start adding unit test cases. |
Thanks
I think you're right, for consistency we should probably always require a |
Pinging @elastic/es-search-aggs |
@Chandan83 did you have a chance to get back to this? |
@javanna I could not find time to write the test cases. I might get to it in the first 2 weeks of April or most likely in May. |
@jimczi I have added the requires test cases. |
jenkins, test this |
jenkins, test this |
@jimczi The console log seems to suggest that the failure is unrelated to the commits. Please guide me here. |
The pr is quite old so you should merge with master to pull the changes. Just do |
jenkins, test this |
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.
Looks good to me. Thanks @Chandan83.
The tests are still failing but this pr is not the cause. Can you merge with master again and I'll merge if the tests pass.
jenkins retest this please |
Thanks @Chandan83 ! |
This change adds the support for a `span_gap` query inside the span query DSL.
* master: Enable skipping fetching latest for BWC builds (elastic#29497) Add remote cluster client (elastic#29495) Ensure flush happens on shard idle Adds SpanGapQueryBuilder in the query DSL (elastic#28636) Control max size and count of warning headers (elastic#28427) Make index APIs work without types. (elastic#29479) Deprecate filtering on `_type`. (elastic#29468) Fix auto-generated ID example format (elastic#29461) Fix typo in max number of threads check docs (elastic#29469) Add primary term to translog header (elastic#29227) Add a helper method to get a random java.util.TimeZone (elastic#29487) Move TimeValue into elasticsearch-core project (elastic#29486)
* es/master: Add remote cluster client (#29495) Ensure flush happens on shard idle Adds SpanGapQueryBuilder in the query DSL (#28636) Control max size and count of warning headers (#28427) Make index APIs work without types. (#29479) Deprecate filtering on `_type`. (#29468) Fix auto-generated ID example format (#29461) Fix typo in max number of threads check docs (#29469) Add primary term to translog header (#29227) Add a helper method to get a random java.util.TimeZone (#29487) Move TimeValue into elasticsearch-core project (#29486) Fix NPE in InternalGeoCentroidTests#testReduceRandom (#29481) Build: introduce keystoreFile for cluster config (#29491) test: Index more docs, so that it is less likely the search request does not time out.
* es/6.x: Enable skipping fetching latest for BWC builds (#29497) Add remote cluster client (#29495) Ensure flush happens on shard idle Adds SpanGapQueryBuilder in the query DSL (#28636) Fix auto-generated ID example format (#29461) Fix typo in max number of threads check docs (#29469) Add primary term to translog header (#29227) Add a helper method to get a random java.util.TimeZone (#29487) Move TimeValue into elasticsearch-core project (#29486) Fix NPE in InternalGeoCentroidTests#testReduceRandom (#29481) Build: introduce keystoreFile for cluster config (#29491) test: Index more docs, so that it is less likely the search request does not time out.
This query is undocumented in the span queries documentation; it'll be exposed in the .NET client, so I'll base the implementation on how it's used in SpanGapQueryBuilderTests.java |
SpanGapQueryBuilder is unlike any other QueryBuilder because it cannot be used to generate a SpanGapQuery which is private to SpanNearQuery. More details in the code comments. To the best of my intentions, I have adhered to all contributing guidelines except writing new unit tests. Before starting to write unit tests, I thought it will be useful to get some feedback on the general approach of the solution since it is little unusual compared to existing code.
Closes #27862