Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use field tokenization options by default when searching in a field #9

Closed
mikegoatly opened this issue Oct 23, 2019 · 1 comment
Closed

Comments

@mikegoatly
Copy link
Owner

Given this:

bookIndex.WithItemTokenization<Book>(
                options => options
                    .WithKey(b => b.BookId)
                    .WithField("Title", b => b.Title, new TokenizationOptions(TokenizerKind.Default) { Stem = true }));

bookIndex.Search("Title=foo");

The search will not use stemming, so you may not get exactly the results you were expecting given the field was indexed with stemming enabled.

You can work around this by indicating that stemming should be used when searching:

bookIndex.Search("Title=foo", new TokenizationOptions(TokenizerKind.Default) { Stem = true });

But it would be much better if when doing a field search it used the tokenization options of the field by default.

@mikegoatly
Copy link
Owner Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant