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

CopyC#
title
and
CopyC#
body
):

CopyC#
(title:term1 body:term1) (title:term2 body:term2)

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

CopyC#
+(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.

Namespace: Lucene.Net.QueryParsers
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
[ObsoleteAttribute("Please use MultiFieldQueryParser(Version, String[], Analyzer) instead")]
public MultiFieldQueryParser(
	string[] fields,
	Analyzer analyzer
)
Visual Basic
<ObsoleteAttribute("Please use MultiFieldQueryParser(Version, String[], Analyzer) instead")> _
Public Sub New ( _
	fields As String(), _
	analyzer As Analyzer _
)
Visual C++
[ObsoleteAttribute(L"Please use MultiFieldQueryParser(Version, String[], Analyzer) instead")]
public:
MultiFieldQueryParser(
	array<String^>^ fields, 
	Analyzer^ analyzer
)

Parameters

fields
Type: array<System..::..String>[]()[][]

[Missing <param name="fields"/> documentation for "M:Lucene.Net.QueryParsers.MultiFieldQueryParser.#ctor(System.String[],Lucene.Net.Analysis.Analyzer)"]

analyzer
Type: Lucene.Net.Analysis..::..Analyzer

[Missing <param name="analyzer"/> documentation for "M:Lucene.Net.QueryParsers.MultiFieldQueryParser.#ctor(System.String[],Lucene.Net.Analysis.Analyzer)"]

See Also