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);
|
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);
|
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);
|
filter = new NotFilter(filter);
|
||||||
|
// cache the not filter as well, so it will be faster
|
||||||
|
filter = parseContext.cacheFilter(filter);
|
||||||
|
|
||||||
filter = wrapSmartNameFilter(filter, smartNameFieldMappers, parseContext);
|
filter = wrapSmartNameFilter(filter, smartNameFieldMappers, parseContext);
|
||||||
|
|
||||||
|
|
|
@ -85,11 +85,11 @@ public class MissingFilterParser extends AbstractIndexComponent implements XCont
|
||||||
filter = new TermRangeFilter(fieldName, null, null, true, true);
|
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);
|
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);
|
filter = new NotFilter(filter);
|
||||||
|
// cache the not filter as well, so it will be faster
|
||||||
|
filter = parseContext.cacheFilter(filter);
|
||||||
|
|
||||||
filter = wrapSmartNameFilter(filter, smartNameFieldMappers, parseContext);
|
filter = wrapSmartNameFilter(filter, smartNameFieldMappers, parseContext);
|
||||||
if (filterName != null) {
|
if (filterName != null) {
|
||||||
|
|
Loading…
Reference in New Issue