Table of Contents

Class FullTextType

Namespace
Examine.Lucene.Indexing
Assembly
Examine.Lucene.dll

Default implementation for full text searching

public class FullTextType : IndexFieldValueTypeBase, IIndexFieldValueType, IIndexFacetValueType
Inheritance
FullTextType
Implements
Inherited Members

Remarks

By default will use a CultureInvariantStandardAnalyzer to perform the search and it will do an exact match search if the term is less than 4 chars, else it will do a full text search on the phrase with a higher boost, then

Constructors

FullTextType(string, ILoggerFactory, Analyzer?, bool)

Constructor

[Obsolete("To be removed in Examine V5")]
public FullTextType(string fieldName, ILoggerFactory logger, Analyzer? analyzer = null, bool sortable = false)

Parameters

fieldName string
logger ILoggerFactory
analyzer Analyzer

Defaults to CultureInvariantStandardAnalyzer

sortable bool

FullTextType(string, ILoggerFactory, bool, bool, bool, Analyzer)

Constructor

public FullTextType(string fieldName, ILoggerFactory logger, bool isFacetable, bool taxonomyIndex, bool sortable, Analyzer analyzer)

Parameters

fieldName string
logger ILoggerFactory
isFacetable bool
taxonomyIndex bool
sortable bool
analyzer Analyzer
Defaults to CultureInvariantStandardAnalyzer

Properties

Analyzer

Returns the analyzer for this field type, or null to use the default

public override Analyzer Analyzer { get; }

Property Value

Analyzer

IsTaxonomyFaceted

Whether the Field is indexed in the Taxonomy Index

public bool IsTaxonomyFaceted { get; }

Property Value

bool

SortableFieldName

Can be sorted by a concatenated field name since to be sortable it cannot be analyzed

public override string? SortableFieldName { get; }

Property Value

string

Methods

AddSingleValue(Document, object)

Adds a single value to the document

protected override void AddSingleValue(Document doc, object value)

Parameters

doc Document
value object

AddValue(Document, object?)

Adds a value to the document

public override void AddValue(Document doc, object? value)

Parameters

doc Document
value object

ExtractFacets(IFacetExtractionContext, IFacetField)

Extracts the facets from the field

public virtual IEnumerable<KeyValuePair<string, IFacetResult>> ExtractFacets(IFacetExtractionContext facetExtractionContext, IFacetField field)

Parameters

facetExtractionContext IFacetExtractionContext
field IFacetField

Returns

IEnumerable<KeyValuePair<string, IFacetResult>>

A dictionary of facets for this field

GenerateQuery(string, string, Analyzer)

Generates a full text query

public static Query? GenerateQuery(string fieldName, string query, Analyzer analyzer)

Parameters

fieldName string
query string
analyzer Analyzer

Returns

Query

GetQuery(string)

Builds a full text search query

public override Query? GetQuery(string query)

Parameters

query string

Returns

Query