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

Bypass highlight query terms extraction on empty fields #32090

Merged
merged 1 commit into from
Jul 16, 2018

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Jul 16, 2018

Dealing with empty fields in the highlight phase can
slow down the query because the query terms extraction is done independently
on each field. This change shortcuts the highlighting performed by the unified highlighter
for fields that are not present in the document. In such cases there is nothing to higlight so
we don't need to visit the query to build the highligh builder.

Dealing with empty fields in the highlight phase can
slow down the query because the query terms extraction is done independently
on each field. This change shortcuts the highlighting performed by the unified highlighter
for fields that are not present in the document. In such cases there is nothing to higlight so
we don't need to visit the query to build the highligh builder.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

LGTM

@jimczi jimczi merged commit f699cb9 into elastic:master Jul 16, 2018
@jimczi jimczi deleted the unified_highlighter_empty_field branch July 16, 2018 22:26
jimczi added a commit that referenced this pull request Jul 16, 2018
Dealing with empty fields in the highlight phase can
slow down the query because the query terms extraction is done independently
on each field. This change shortcuts the highlighting performed by the unified highlighter
for fields that are not present in the document. In such cases there is nothing to higlight so
we don't need to visit the query to build the highligh builder.
martijnvg added a commit that referenced this pull request Jul 17, 2018
* es/6.x:
  Scripting: Remove dead code from painless module (#32064) (#32104)
  Painless: Move and Rename Several Methods in the lookup package (#32105)
  Bypass highlight query terms extraction on empty fields (#32090)
  Core: Backport java time date formatters (#31997)
  Switch non-x-pack to new style requests (#32106)
  SQL: allow LEFT and RIGHT as function names (#32066)
  Painless: Separate PainlessLookup into PainlessLookup and PainlessLookupBuilder (#32054)
  [test] turn on host io cache for opensuse (#32053)
  DOCS: put LIMIT 10 to the SQL query (#32065)
martijnvg added a commit that referenced this pull request Jul 17, 2018
* es/master:
  Add Index UUID to `/_stats` Response (#31871)
  Painless: Move and Rename Several Methods in the lookup package (#32105)
  Bypass highlight query terms extraction on empty fields (#32090)
  Switch non-x-pack to new style requests (#32106)
  [Rollup] Add new capabilities endpoint for concrete rollup indices (#30401)
  Revert "[test] disable packaging tests for suse boxes"
  SQL: allow LEFT and RIGHT as function names (#32066)
  DOCS: put LIMIT 10 to the SQL query (#32065)
  [test] turn on host io cache for opensuse (#32053)
  Tweaked Elasticsearch Service links for SEO
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