mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
better caching of missing filter / query
This commit is contained in:
parent
b0a0604473
commit
62526444fd
@ -50,11 +50,11 @@ public class MissingFieldQueryExtension implements FieldQueryExtension {
|
||||
filter = new TermRangeFilter(fieldName, null, null, true, true);
|
||||
}
|
||||
|
||||
// we always cache this one, really does not change...
|
||||
// we always cache this one, really does not change... (exists)
|
||||
filter = parseContext.cacheFilter(filter);
|
||||
// we do the cached before the NotFilter, since there is no need to cache the not result, and this
|
||||
// way we share with the exists filter
|
||||
filter = new NotFilter(filter);
|
||||
// cache the not filter as well, so it will be faster
|
||||
filter = parseContext.cacheFilter(filter);
|
||||
|
||||
filter = wrapSmartNameFilter(filter, smartNameFieldMappers, parseContext);
|
||||
|
||||
|
@ -85,11 +85,11 @@ public class MissingFilterParser extends AbstractIndexComponent implements XCont
|
||||
filter = new TermRangeFilter(fieldName, null, null, true, true);
|
||||
}
|
||||
|
||||
// we always cache this one, really does not change...
|
||||
// we always cache this one, really does not change... (exists)
|
||||
filter = parseContext.cacheFilter(filter);
|
||||
// we do the cached before the NotFilter, since there is no need to cache the not result, and this
|
||||
// way we share with the exists filter
|
||||
filter = new NotFilter(filter);
|
||||
// cache the not filter as well, so it will be faster
|
||||
filter = parseContext.cacheFilter(filter);
|
||||
|
||||
filter = wrapSmartNameFilter(filter, smartNameFieldMappers, parseContext);
|
||||
if (filterName != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user