Default tokenization
Specifies the default tokenization options that should be used when searching or indexing when tokenization options are not explicitly specified for an object type.
FullTextIndexBuilder<TKey>
to configure the behavior of your index.FullTextIndexBuilder<TKey>
FullTextIndexBuilder
requires a single generic type provided to it.
This defines the type of the key that documents will be indexed against.
In simple cases this will just be a string
, Guid
, Int32
or UInt32
.
Indexes can be built with other key types, including composite types, but special care needs
to be made when using the binary serializer. See Key Serialization
for more information.
Create an index with defaults:
var index = new FullTextIndexBuilder<int>()
.Build();
Enable word stemming:
var index = new FullTextIndexBuilder<int>()
.WithDefaultTokenizationOptions(o => o.WithStemming())
.Build();
With object indexing enabled for a Customer
type and stemming only enabled for the Notes
property:
var index = new FullTextIndexBuilder<int>()
.WithObjectTokenization<Customer>(o => o
.WithId(c => c.CustomerId)
.WithField("Name", c=>c.Name)
.WithField("Notes", c=>c.Notes, fo => fo.WithStemming())
)
.Build();
Specifies the default tokenization options that should be used when searching or indexing when tokenization options are not explicitly specified for an object type.
Configure the index to accept a strongly typed object when indexing content.
Configure how the index should behave when indexing an item that is already present in the index.
Configure how the LIFTI query parser should operate for the index.
Prescribes how the index should treat terms as synonymous when they are being added to the index.
Text extraction is the process by which fragments of text are lifted from a larger body of text prior to tokenization.
You can use a simple query parser when you don’t want queries to make use of the full LIFTI query syntax.
You can register an async action that needs to occur when mutations to the index are committed and a new snapshot is generated.