-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Suggestions and Spellchecking #326
Conversation
I think this is in a good spot now that it can be extended and there is support for suggestions in the demoweb. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nzdev I've left some comments - It's mostly about XML comments and I didn't mark everything I think you get the gist. You should also consider if this feature should go into Examine v3 or v4. I can see some areas where this could have binary breaking changes and therefore this, should properly be in v4. And then you could rebase and get nullable and XML warnings.
src/Examine.Lucene/Suggest/AnalyzingInfixSuggesterDefinition.cs
Outdated
Show resolved
Hide resolved
src/Examine.Lucene/Suggest/AnalyzingInfixSuggesterDefinition.cs
Outdated
Show resolved
Hide resolved
…to v3/feature/suggestions
Updated for V4. Docs added. |
Adds support for Suggestions for search text.
Adds ISuggester to IIndex for running suggestion queries, includes Lucene implementation.
Added suggester to Demo site.
Added documentation
Added tests
Registering Suggesters
On the index to register the Suggesters, create a SuggesterDefinitionCollection and set it on IndexOptions.SuggesterDefinitions. Only FullText fields can be source fields for suggesters.
Example
Suggester API
This code will run a suggestion for the input text "Sam", returning up to 5 suggestions.
Lucene Suggesters
To generate suggestions for input text, retreive the ISuggester from the index IIndex.Suggester.
Analyzing Infix Suggester
This code will run a suggestion for the input text "Sam", returning up to 5 suggestions, and will highlight the result text which matches the input text..
Analyzing Suggester
This code will run a suggestion for the input text "Sam", returning up to 5 suggestions.
Fuzzy Suggester
This code will run a Fuzzy suggestion for the input text "Sam", returning up to 5 suggestions.
Direct SpellChecker Suggester
This code will run a spellchecker suggestion for the input text "Sam" returning up to 5 suggestions.