Class MultiTextFieldQuery

    • Constructor Detail

      • MultiTextFieldQuery

        public MultiTextFieldQuery​(String query,
                                   Set<String> fields,
                                   BooleanOperator operator)
        Constructs a multi-field query with the specified query, fields and operator.
        Parameters:
        fields - the fields to query against
        operator - whether the query must match all terms AND or any of them {code OR}.
        query - the query
      • MultiTextFieldQuery

        public MultiTextFieldQuery​(String query,
                                   String... fields)
        Constructs a multi-field query with the operator set to BooleanOperator.AND.
        Parameters:
        fields - the fields to query against
        query - the query
      • MultiTextFieldQuery

        public MultiTextFieldQuery​(Collection<String> fields,
                                   Map<String,​? extends AnalyzerDescriptorProvider> analyzerProviders,
                                   BooleanOperator operator,
                                   String query)
        Create a query where a field can be tokenized by a provided analyzer.
        Parameters:
        fields - the fields to query against
        analyzerProviders - specifies a non-standard analyzer for a field
        operator - whether the query must match all terms AND or any of them {code OR}
        query - the query
        Since:
        7.0