public async Task InitializeAsync()
        {
            this.index = new FullTextIndexBuilder <string>()
                         .WithObjectTokenization <(string, string, string)>(
                o => o.WithKey(i => i.Item1)
                .WithField("Field1", i => i.Item2)
                .WithField("Field2", i => i.Item3))
                         .Build();

            await this.index.AddAsync("A", "Triumphant elephant strode elegantly with indifference to shouting subjects, giving withering looks to individuals");

            this.sut = this.index.Snapshot.CreateNavigator();
        }
Beispiel #2
0
        public static void WriteMatchState(IIndexNavigator navigator)
        {
            Console.WriteLine($@"Exact matches: {navigator.GetExactMatches().Matches.Count} 
Exact and child matches: {navigator.GetExactAndChildMatches().Matches.Count}");
        }