Class PerFieldAnalyzerWrapper
This analyzer is used to facilitate scenarios where different
fields require different analysis techniques. Use Add
Example usage:
PerFieldAnalyzerWrapper aWrapper =
new PerFieldAnalyzerWrapper(new StandardAnalyzer());
aWrapper.addAnalyzer("firstname", new KeywordAnalyzer());
aWrapper.addAnalyzer("lastname", new KeywordAnalyzer());
In this example, StandardAnalyzer will be used for all fields except "firstname" and "lastname", for which KeywordAnalyzer will be used.
A PerFieldAnalyzerWrapper can be used like any other analyzer, for both indexing and query parsing.
Inherited Members
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public class PerFieldAnalyzerWrapper : Analyzer
Constructors
Name | Description |
---|---|
Per |
Constructs with default analyzer. |
PerFieldAnalyzerWrapper(Analyzer, IEnumerable<KeyValuePair<String, Analyzer>>) | Constructs with default analyzer and a map of analyzers to use for specific fields. |
Methods
Name | Description |
---|---|
Add |
Defines an analyzer to use for the specified field. |
Get |
Return the offsetGap from the analyzer assigned to field |
Get |
Return the positionIncrementGap from the analyzer assigned to fieldName |
Reusable |
|
Token |
|
To |