Releases: mikegoatly/lifti
v3.4.0
- The default value for fuzzy matching maximum sequential edits has changed from
termLength / 4
totermLength < 4 ? 1 : termLength / 4
. Without this, fuzzy matching is disabled for search terms of less than 4 characters, which was unintended. - When explicitly configuring parameters for the fuzzy search operator in a LIFTI query, the comma can now be omitted if you don't want to override the max sequential edits value.
v3.3.0
- Added support for customization of fuzzy matching parameters at an index and query level #49
- Added an alternative simple query parser for when the full LIFTI query syntax isn't needed
- The
IQueryParser
for an index is now accessible asIFullTextIndex.QueryParser
- New configuration point
FullTextQueryBuilder.WithDefaultJoiningOperator
allows for control over whether an "and" or "or" operator is used to combine search terms without an explicit operator between them.
v3.2.0
- Added convenience method
CombineAll
toOrQueryOperator
andAndQueryOperator
allowing for the easy combining of a series of query parts. - Added
Query.Empty
as a static instance of an empty query.
v3.1.0
Fixes #46 - This release allows for multiple indexes to be serialized into, and deserialized from the same file, one after another, e.g.:
var serializer = new BinarySerializer<string>();
using (var stream = File.Open(fileName, FileMode.CreateNew))
{
await serializer.SerializeAsync(index1, stream, false);
await serializer.SerializeAsync(index2, stream, true);
}
using (var stream = File.Open(fileName, FileMode.Open))
{
var deserializedIndex1 = new FullTextIndexBuilder<string>().Build();
var deserializedIndex2 = new FullTextIndexBuilder<string>().Build();
await serializer.DeserializeAsync(deserializedIndex1, stream, false);
await serializer.DeserializeAsync(deserializedIndex2, stream, true);
deserializedIndex1.Search("Foo").Should().HaveCount(1);
deserializedIndex2.Search("Bar").Should().HaveCount(1);
}
v3.0.1
v3.0.0
New features
Fuzzy matching
You can now query an index with a fuzzy match by prefixing a search
term with ?
or by configuring the query parser to use fuzzy matching by default.
Wildcard searching
A more controlled way of fuzzy matching text, you can now use *
anywhere in a search term to indicate zero or more or any
character, and %
to indicate a single character match. For example:
- searching for
%%%ing
returns all words that start with any 3 characters and end withing
. - searching for
*ing
returns all words that end withing
.
Other minor enhancements
- Passing manually constructed
IQuery
s toIFullTextIndex.Search
- New
WithQueryParser
overload onFullTextIndexBuilder
allows for configuration of fuzzy matching by default when parsing queries.
Breaking changes
Most of these won't affect anyone using LIFTI under normal conditions - only indexes with custom implementations of certain interfaces will need modification.
IIndexNavigator.GetExactAndChildMatches
,IIndexNavigator.GetExactMatches
andIScorer.Score
all have an additional parameterweighting
that should be used as a multiplier for the scores of any matches.- New method
IIndexNavigator.CreateBookmark
used to capture a snapshot of the index navigator's state that can be reapplied by callingIIndexNavigatorBookmark.Apply
. Once a bookmark has been applied,EnumerateIndexedWords
cannot be used and will throw an exception. - New method
IIndexNavigator.EnumerateNextCharacters
- enumerates any reachable characters from the current location in the index IQueryTokenizer
andQueryParser
are now an internal; both are used as part of the LIFTI query parser implementation configured using the index builder, so shouldn't need to be used externally.- New method
ITokenizer.Normalize
used to normalize a fragment of text according to the tokenizer's rules without tokenizing.
v2.1.1
v2.1.0
v2.0.0
You can now override the ITokenizer
implementation used in an index if you need to.
v2.0.0-rc1
The first release candidate for V2. Hopefully it'll be out of RC over the next couple of weeks.
A fairly big refactoring, key breaking changes are:
-
TokenizationOptionsBuilder.XmlContent
has been removed and replaced with the concept of text extractors. This is a much better design and makes it easier to implement text extraction from other formats, e.g. JSON, RTF. -
FullTextIndexBuilder.WithDefaultTokenizationOptions
renamed toWithDefaultTokenization