Skip to content

Commit 6608580

Browse files
authored
Update significant_text aggregation to only parse the field it requires 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.
1 parent 58a5173 commit 6608580

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/SignificantTextAggregatorFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ protected void processTokenStream(
363363
* Extract values from {@code _source}.
364364
*/
365365
protected List<Object> extractRawValues(String field) {
366-
return sourceLookup.extractRawValues(field);
366+
return sourceLookup.extractRawValuesWithoutCaching(field);
367367
}
368368

369369
@Override

0 commit comments

Comments
 (0)