Skip to content
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

Joint parsing of common global Hightlighter and subfield parameters #15368

Merged

Conversation

cbuescher
Copy link
Member

The top-level highlighter has many options that can be overwritten per field. Currently there is very similar code for this in two places. This PR pulls out the parsing of the common parameters into AbstractHighlighterBuilder for better reuse and to keep parsing of common parameters more consistent.

Closes #15285

highlightBuilder.options(parser.map());
} else if (parseContext.parseFieldMatcher().match(topLevelFieldName, FIELDS_FIELD)) {
String highlightFieldName = null;
boolean rc = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we name this something more descriptive like parsedValue or something?

@colings86
Copy link
Contributor

Left a minor comment but LGTM

@cbuescher cbuescher force-pushed the highlight-builder-shared-parsing branch 2 times, most recently from 4552ed0 to a4936d1 Compare December 14, 2015 14:08
The top-level highlighter has many options that can be overwritten per
field. Currently there is very similar code for this in two places.
This PR pulls out the parsing of the common parameters into
AbstractHighlighterBuilder for better reuse and to keep parsing of
common parameters more consistent.
@cbuescher cbuescher force-pushed the highlight-builder-shared-parsing branch from a4936d1 to 2ab937d Compare December 14, 2015 14:09
@cbuescher
Copy link
Member Author

Thanks for the review, addressed your comments and will merge.

cbuescher added a commit that referenced this pull request Dec 14, 2015
…sing

Joint parsing of common global Hightlighter and subfield parameters
@cbuescher cbuescher merged commit 7742c1e into elastic:master Dec 14, 2015
@cbuescher cbuescher deleted the highlight-builder-shared-parsing branch March 31, 2016 09:21
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Search Refactoring labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Relevance/Highlighting How a query matched a document :Search/Search Search-related issues that do not fall into other categories v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants