Class CoveringQuery


  • public final class CoveringQuery
    extends Query
    A Query that allows to have a configurable number or required matches per document. This is typically useful in order to build queries whose query terms must all appear in documents.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • CoveringQuery

        public CoveringQuery​(Collection<Query> queries,
                             LongValuesSource minimumNumberMatch)
        Sole constructor.
        Parameters:
        queries - Sub queries to match.
        minimumNumberMatch - Per-document long value that records how many queries should match. Values that are less than 1 are treated like 1: only documents that have at least one matching clause will be considered matches. Documents that do not have a value for minimumNumberMatch do not match.