V6.0.1 #108
mikegoatly
announced in
Announcements
V6.0.1
#108
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are a couple of breaking changes in this release, most of which are due to renaming of types. Some guidance can be found below for how to deal with them.
New features
grand^3
will boost the score of words matching "grand"..WithField("Name", c => c.Name, scoreBoost: 1.5D)
.System.Collections.Immutable
- only the netstandard2 version of the library now pulls in any dependencies. For net6 to net8, only built in types are used.Performance increases
There was a significant amount of work done to improve performance and memory usage of building an index, index (de)serialization and searching.
Index construction
Populating an index with 200 Wikipedia entries in a single batch
Populating each of the 200 Wikipedia entries one at a time (i.e. a new snapshot created after each document)
Searching
Lots of individual optimisations including:
make for some nice gains for various query types.
Deprecated:
ItemMetadata.Item
/DocumentMetadata.Item
-> useKey
propertyIFullTextIndex.Items
-> useMetadata
propertyFullTextIndexBuilder.WithDuplicateItemBehavior
-> useWithDuplicateKeyBehavior
methodIndexOptions.DuplicateItemBehavior
-> useDuplicateKeyBehavior
propertyScoredToken.ItemId
-> useDocumentId
propertyQueryTokenMatch.ItemId
-> useDocumentId
propertyItemMetadata.Count
->IndexMetadata.DocumentCount
ItemMetadata.GetMetadata
->IndexMetadata.GetDocumentMetadata
Technically breaking
IdPool
andIIdPool
are now internal - These weren't really exposed before anywayRemoved interface
IItemMetadata
- just usingDocumentMetadata
going forwardsQueryContext
no longer hasApplyTo
methodIIndexNavigator
: addedSnapshot
propertyIIndexNavigator
: added overloads forGetExactMatches
andGetExactAndChildMatches
that allow for the currentQueryContext
to be passed in so unnecessary results are not collected.IIndexNavigator
: new additional methodsAddExactMatches
andAddExactAndChildMatches
that allow you to efficiently collect matches using aDocumentMatchCollector
before converting it to anIntermediateQueryResult
.IQueryPart
now hasdouble CalculateWeighting(Func<IIndexNavigator> navigatorCreator)
method to help the query processing logic evaluate the most efficient order of execution.TItem
generic type parameter name has been renamed toTObject
.All query part types are now sealed
New method
IIndexNavigator.ExactMatchCount()
IntermediateQueryResult
constructors are no longer publicIndex serialization interfaces have been reworked. This shouldn't affect anyone because it was technically impossible to write your own serializers based upon them due to a lack of publicly accessible methods for rehydrating an index.
IIndexNavigatorBookmark
now implementsIDisposable
- you don't technically have to dispose it, but doing so will return it to a pool and allow it to be reused.Querying changes
ScoredFieldMatch
is now quite different and no longer publicly constructable. The only place you would have encountered this is in a custom scorer, and that's no longer necessary.Several types that are only likely to have been used internally are gone:
FieldMatch
QueryTokenMatch
CompositeTokenMatchLocation
SingleTokenMatchLocation
ITokenLocationMatch
TokenLocationMatch
Breaking
DuplicateItemBehavior
enum -> renamed toDuplicateKeyBehavior
DuplicateItemBehavior.ReplaceItem
-> useDuplicateKeyBehavior.Replace
insteadIQueryContext
-> Just use concreteQueryContext
this affectsIQueryPart.Evaluate
as it now takesQueryContext
IIndexNodeFactory.CreateNode
now takes concrete typesChildNodeMap
andDocumentTokenMatchMap
instead ofImmutableDictionary
andImmutableList
respectively.A maximum of 31 different object types can now be configured against a single
FullTextIndexBuilder
(i.e. 31 distinct calls toWithObjectTokenization
) - if anyone is actually indexing more that 31 object types, I'd be very interested to understand your scenario!The rest of these will only affect you if you are explicitly referencing the type names in your code:
ItemPhrases
-> renamed toDocumentPhrases
ItemMetadata
-> renamed toDocumentMetadata
IItemStore
-> renamed toIIndexMetadata
This discussion was created from the release V6.0.1.
Beta Was this translation helpful? Give feedback.
All reactions