Using the simple query parser

You can use a simple query parser when you don’t want queries to make use of the full LIFTI query syntax.

Configuring the SimpleQueryParser

FullTextIndexBuilder<TKey> WithSimpleQueryParser()

FullTextIndexBuilder<TKey> WithSimpleQueryParser(Func<QueryParserBuilder, QueryParserBuilder> optionsBuilder)

If you don’t want to be querying against the index using the full LIFTI query syntax then you can use this method to query using simplified queries.

You can optionally configure the query parser using the QueryParserBuilder, as you can with WithQueryParser: QueryParserBuilder options.

Example usage

var index = new FullTextIndexBuilder<int>()
    .WithSimpleQueryParser()
    .Build();

var index = new FullTextIndexBuilder<int>()
    .WithSimpleQueryParser(o => o.AssumeFuzzySearch())
    .Build();
Last modified January 16, 2024: V6.0.0 (#107) (125ae87)