-
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
Construct the significant terms aggregation builder's parser statically #25519
Comments
Marked a |
Same is true for SignificantTextAggregationBuilder which follows the same pattern. I took a quick first look at it, changing the way the heuristics are registered is only part of this. I quickly got stuck when trying to convert the part around Line 98 in f576c98
|
@elastic/es-search-aggs |
This adds support for "collapsed" named object to `ObjectParser`. In particular, this supports the sort of xcontent that we use to specify significance heuristics. See elastic#25519 and this example: ``` GET /_search { "query" : { "terms" : {"force" : [ "British Transport Police" ]} }, "aggregations" : { "significant_crime_types" : { "significant_terms" : { "field" : "crime_type", "mutual_information" : { <<------- This is the name "include_negatives": true } } } } } ``` I believe there are a couple of things that work this way. I've held off on moving the actual parsing of the significant heuristics to this code to kep the review more compact. The moving is pretty mechanical stuff in the aggs framework.
This adds support for "collapsed" named object to `ObjectParser`. In particular, this supports the sort of xcontent that we use to specify significance heuristics. See #25519 and this example: ``` GET /_search { "query" : { "terms" : {"force" : [ "British Transport Police" ]} }, "aggregations" : { "significant_crime_types" : { "significant_terms" : { "field" : "crime_type", "mutual_information" : { <<------- This is the name "include_negatives": true } } } } } ``` I believe there are a couple of things that work this way. I've held off on moving the actual parsing of the significant heuristics to this code to keep the review more compact. The moving is pretty mechanical stuff in the aggs framework.
This adds support for "collapsed" named object to `ObjectParser`. In particular, this supports the sort of xcontent that we use to specify significance heuristics. See elastic#25519 and this example: ``` GET /_search { "query" : { "terms" : {"force" : [ "British Transport Police" ]} }, "aggregations" : { "significant_crime_types" : { "significant_terms" : { "field" : "crime_type", "mutual_information" : { <<------- This is the name "include_negatives": true } } } } } ``` I believe there are a couple of things that work this way. I've held off on moving the actual parsing of the significant heuristics to this code to keep the review more compact. The moving is pretty mechanical stuff in the aggs framework.
This replaces the hand written xcontent parsers for significance heristics with `ObjectParser` and parsing named xcontent. As a happy accident, this was the last user of `ParseFieldRegistry` so this PR entirely removes that class. Closes elastic#25519
This adds support for "collapsed" named object to `ObjectParser`. In particular, this supports the sort of xcontent that we use to specify significance heuristics. See #25519 and this example: ``` GET /_search { "query" : { "terms" : {"force" : [ "British Transport Police" ]} }, "aggregations" : { "significant_crime_types" : { "significant_terms" : { "field" : "crime_type", "mutual_information" : { <<------- This is the name "include_negatives": true } } } } } ``` I believe there are a couple of things that work this way. I've held off on moving the actual parsing of the significant heuristics to this code to keep the review more compact. The moving is pretty mechanical stuff in the aggs framework.
This replaces the hand written xcontent parsers for significance heristics with `ObjectParser` and parsing named xcontent. As a happy accident, this was the last user of `ParseFieldRegistry` so this PR entirely removes that class. Closes #25519
This replaces the hand written xcontent parsers for significance heristics with `ObjectParser` and parsing named xcontent. As a happy accident, this was the last user of `ParseFieldRegistry` so this PR entirely removes that class. Closes elastic#25519
This replaces the hand written xcontent parsers for significance heristics with `ObjectParser` and parsing named xcontent. As a happy accident, this was the last user of `ParseFieldRegistry` so this PR entirely removes that class. Closes #25519
This adds support for "collapsed" named object to `ObjectParser`. In particular, this supports the sort of xcontent that we use to specify significance heuristics. See elastic#25519 and this example: ``` GET /_search { "query" : { "terms" : {"force" : [ "British Transport Police" ]} }, "aggregations" : { "significant_crime_types" : { "significant_terms" : { "field" : "crime_type", "mutual_information" : { <<------- This is the name "include_negatives": true } } } } } ``` I believe there are a couple of things that work this way. I've held off on moving the actual parsing of the significant heuristics to this code to keep the review more compact. The moving is pretty mechanical stuff in the aggs framework.
This replaces the hand written xcontent parsers for significance heristics with `ObjectParser` and parsing named xcontent. As a happy accident, this was the last user of `ParseFieldRegistry` so this PR entirely removes that class. Closes elastic#25519
Right now we build a new ObjectParser every time we want get a significant terms aggregation. We do this because we had to pass in
ParseFieldRegistry<SignificanceHeuristicParser>
. I think we can avoid this by movingParseFieldRegistry<SignificanceHeuristicParser>
toNamedXContentRegistry
style parsing.The text was updated successfully, but these errors were encountered: