Creates a MultiFieldQueryParser. Allows passing of a map with term to
Boost, and the boost to apply to each term.
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# and
CopyC#):
CopyC#
When setDefaultOperator(AND_OPERATOR) is set, the result will be:
CopyC#
When you pass a boost (title=>5 body=>10) you can get
CopyC#
In other words, all the query's terms must appear, but it doesn't matter
in what fields they appear.
Namespace: Lucene.Net.QueryParsers
title

body

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

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

+(title:term1^5.0 body:term1^10.0) +(title:term2^5.0 body:term2^10.0)
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
[ObsoleteAttribute("Please use MultiFieldQueryParser(Version, String[], Analyzer, IDictionary) instead")] public MultiFieldQueryParser( string[] fields, Analyzer analyzer, IDictionary boosts ) |
Visual Basic |
---|
<ObsoleteAttribute("Please use MultiFieldQueryParser(Version, String[], Analyzer, IDictionary) instead")> _ Public Sub New ( _ fields As String(), _ analyzer As Analyzer, _ boosts As IDictionary _ ) |
Visual C++ |
---|
[ObsoleteAttribute(L"Please use MultiFieldQueryParser(Version, String[], Analyzer, IDictionary) instead")] public: MultiFieldQueryParser( array<String^>^ fields, Analyzer^ analyzer, IDictionary^ boosts ) |
Parameters
- fields
- Type: array<System..::..String>[]()[][]
[Missing <param name="fields"/> documentation for "M:Lucene.Net.QueryParsers.MultiFieldQueryParser.#ctor(System.String[],Lucene.Net.Analysis.Analyzer,System.Collections.IDictionary)"]
- analyzer
- Type: Lucene.Net.Analysis..::..Analyzer
[Missing <param name="analyzer"/> documentation for "M:Lucene.Net.QueryParsers.MultiFieldQueryParser.#ctor(System.String[],Lucene.Net.Analysis.Analyzer,System.Collections.IDictionary)"]
- boosts
- Type: System.Collections..::..IDictionary
[Missing <param name="boosts"/> documentation for "M:Lucene.Net.QueryParsers.MultiFieldQueryParser.#ctor(System.String[],Lucene.Net.Analysis.Analyzer,System.Collections.IDictionary)"]