Overload List

  NameDescription
Public methodParse(String)
Parses a query string, returning a {@link Lucene.Net.Search.Query}.
(Inherited from QueryParser.)
Public methodStatic memberParse(array<String>[]()[][], array<String>[]()[][], Analyzer) Obsolete.
Parses a query which searches on the fields specified.

If x fields are specified, this effectively constructs:

            <code>
            (field1:query1) (field2:query2) (field3:query3)...(fieldx:queryx)
            </code>
            
Public methodStatic memberParse(String, array<String>[]()[][], array<BooleanClause..::..Occur>[]()[][], Analyzer) Obsolete.
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

            Usage:
            
CopyC#
String[] fields = {"filename", "contents", "description"};
BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
BooleanClause.Occur.MUST,
BooleanClause.Occur.MUST_NOT};
MultiFieldQueryParser.parse("query", fields, flags, analyzer);

The code above would construct a query:

CopyC#
(filename:query) +(contents:query) -(description:query)
Public methodStatic memberParse(array<String>[]()[][], array<String>[]()[][], array<BooleanClause..::..Occur>[]()[][], Analyzer) Obsolete.
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

            Usage:
            
CopyC#
String[] query = {"query1", "query2", "query3"};
String[] fields = {"filename", "contents", "description"};
BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
BooleanClause.Occur.MUST,
BooleanClause.Occur.MUST_NOT};
MultiFieldQueryParser.parse(query, fields, flags, analyzer);

The code above would construct a query:

CopyC#
(filename:query1) +(contents:query2) -(description:query3)
Public methodStatic memberParse(Version, array<String>[]()[][], array<String>[]()[][], Analyzer)
Parses a query which searches on the fields specified.

If x fields are specified, this effectively constructs:

            <code>
            (field1:query1) (field2:query2) (field3:query3)...(fieldx:queryx)
            </code>
            
Public methodStatic memberParse(Version, String, array<String>[]()[][], array<BooleanClause..::..Occur>[]()[][], Analyzer)
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

            Usage:
            <code>
            String[] fields = {"filename", "contents", "description"};
            BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
            BooleanClause.Occur.MUST,
            BooleanClause.Occur.MUST_NOT};
            MultiFieldQueryParser.parse("query", fields, flags, analyzer);
            </code>
            

The code above would construct a query:

            <code>
            (filename:query) +(contents:query) -(description:query)
            </code>
            
Public methodStatic memberParse(Version, array<String>[]()[][], array<String>[]()[][], array<BooleanClause..::..Occur>[]()[][], Analyzer)
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

            Usage:
            <code>
            String[] query = {"query1", "query2", "query3"};
            String[] fields = {"filename", "contents", "description"};
            BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
            BooleanClause.Occur.MUST,
            BooleanClause.Occur.MUST_NOT};
            MultiFieldQueryParser.parse(query, fields, flags, analyzer);
            </code>
            

The code above would construct a query:

            <code>
            (filename:query1) +(contents:query2) -(description:query3)
            </code>
            

See Also