Class FilteredQuery.RandomAccessFilterStrategy

    • Constructor Detail

      • RandomAccessFilterStrategy

        public RandomAccessFilterStrategy()
    • Method Detail

      • useRandomAccess

        protected boolean useRandomAccess​(Bits bits,
                                          int firstFilterDoc)
        Expert: decides if a filter should be executed as "random-access" or not. random-access means the filter "filters" in a similar way as deleted docs are filtered in Lucene. This is faster when the filter accepts many documents. However, when the filter is very sparse, it can be faster to execute the query+filter as a conjunction in some cases. The default implementation returns true if the first document accepted by the filter is < 100.