Skip to content

Commit

Permalink
Update significant_text aggregation to only parse the field it requir…
Browse files Browse the repository at this point in the history
…es from _source (#79651)

Previously created optimizations:

 - Enabling XContentParser filtering for specific fields: #77154
 - Retrieving only specific fields from _source: #79099

Allow significant_text to only parse out the specific field it requires from `_source`. This allows for a minor optimization when `_source` is small, but can be significant (pun intended) when `_source` contains many fields, or other larger fields that `significant_text` doesn't care about.

Since `significant_text` does not allow sub-aggs, not caching the parsed `_source` is reasonable.
  • Loading branch information
benwtrent authored Nov 2, 2021
1 parent 58a5173 commit 6608580
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ protected void processTokenStream(
* Extract values from {@code _source}.
*/
protected List<Object> extractRawValues(String field) {
return sourceLookup.extractRawValues(field);
return sourceLookup.extractRawValuesWithoutCaching(field);
}

@Override
Expand Down

0 comments on commit 6608580

Please sign in to comment.