-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Plumb ValuesSourceRegistry through to QuerySearchContext #51710
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
Changes from all commits
f961b48
d6a91c4
716781d
efb8247
bd12866
80797fa
0fcb81a
f342c4c
1fb0c29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -287,6 +287,7 @@ public class SearchModule { | |
private final Settings settings; | ||
private final List<NamedWriteableRegistry.Entry> namedWriteables = new ArrayList<>(); | ||
private final List<NamedXContentRegistry.Entry> namedXContents = new ArrayList<>(); | ||
private ValuesSourceRegistry valuesSourceRegistry; | ||
|
||
/** | ||
* Constructs a new SearchModule object | ||
|
@@ -298,6 +299,7 @@ public class SearchModule { | |
*/ | ||
public SearchModule(Settings settings, List<SearchPlugin> plugins) { | ||
this.settings = settings; | ||
this.valuesSourceRegistry = new ValuesSourceRegistry(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you still like the idea of changing the ctor to take an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see a clean way to do this. We already manually list all the aggregations once in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is cool to merge as is and grab that in a follow up. Would it be ok if I gave it a shot myself once this is in? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absolutely! |
||
registerSuggesters(plugins); | ||
highlighters = setupHighlighters(settings, plugins); | ||
registerScoreFunctions(plugins); | ||
|
@@ -322,6 +324,10 @@ public List<NamedXContentRegistry.Entry> getNamedXContents() { | |
return namedXContents; | ||
} | ||
|
||
public ValuesSourceRegistry getValuesSourceRegistry() { | ||
return valuesSourceRegistry; | ||
} | ||
|
||
/** | ||
* Returns the {@link Highlighter} registry | ||
*/ | ||
|
@@ -447,7 +453,7 @@ private void registerAggregation(AggregationSpec spec) { | |
} | ||
Consumer<ValuesSourceRegistry> register = spec.getAggregatorRegistrar(); | ||
if (register != null) { | ||
register.accept(ValuesSourceRegistry.getInstance()); | ||
register.accept(this.valuesSourceRegistry); | ||
} | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.