Skip to content

Consolidate search parser registries#20000

Merged
rjernst merged 3 commits intoelastic:masterfrom
rjernst:search_parser
Aug 16, 2016
Merged

Consolidate search parser registries#20000
rjernst merged 3 commits intoelastic:masterfrom
rjernst:search_parser

Conversation

@rjernst
Copy link
Copy Markdown
Member

@rjernst rjernst commented Aug 16, 2016

Parsing a search request is currently split up among a number of
classes, using multiple public static methods, which take multiple
regstries of elements that may appear in the search request like query
parsers and aggregations. This change begins consolidating all this code
by collapsing the registries normally used for parsing search requests
into a single SearchRequestParsers class. It is also made available to
plugin services to enable templating of search requests. Eventually all
of the actual parsing logic should move to the class, and the registries
should be hidden, but for now they are at least co-located to reduce the
number of objects that must be passed around.

Parsing a search request is currently split up among a number of
classes, using multiple public static methods, which take multiple
regstries of elements that may appear in the search request like query
parsers and aggregations. This change begins consolidating all this code
by collapsing the registries normally used for parsing search requests
into a single SearchRequestParsers class. It is also made available to
plugin services to enable templating of search requests.  Eventually all
of the actual parsing logic should move to the class, and the registries
should be hidden, but for now they are at least co-located to reduce the
number of objects that must be passed around.
* Nothing is bound for transport client *but* SearchModule is still responsible for settings up the things like the
* NamedWriteableRegistry.
*/
bind(IndicesQueriesRegistry.class).toInstance(queryParserRegistry);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you are binding SearchRequestParsers do we need to bing IndicesQueriesRegistry?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not, for now. It is used in quite a few places...

@nik9000
Copy link
Copy Markdown
Member

nik9000 commented Aug 16, 2016

Seems like a good start. LGTM.

@dadoonet
Copy link
Copy Markdown
Contributor

Congrats for the 20000th issue/pr:)

@rjernst rjernst merged commit 21af485 into elastic:master Aug 16, 2016
@rjernst rjernst deleted the search_parser branch August 16, 2016 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants