Lucene.Net 1.9.1 Class Library

MultiFieldQueryParser Constructor

Creates a MultiFieldQueryParser.

It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms and you specify the two fields

title
and
body
):

(title:term1 body:term1) (title:term2 body:term2)

When setDefaultOperator(AND_OPERATOR) is set, the result will be:

+(title:term1 body:term1) +(title:term2 body:term2)

In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.

Overload List

 

public MultiFieldQueryParser(CharStream);

 

public MultiFieldQueryParser(QueryParserTokenManager);

 

public MultiFieldQueryParser(string,Analyzer);

Creates a MultiFieldQueryParser. It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms and you specify the two fields

title
and
body
):
(title:term1 body:term1) (title:term2 body:term2)
When setDefaultOperator(AND_OPERATOR) is set, the result will be:
+(title:term1 body:term1) +(title:term2 body:term2)
In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.

public MultiFieldQueryParser(string[],Analyzer);

See Also

MultiFieldQueryParser Class | Lucene.Net.QueryParsers Namespace