Draft: feat: added custom score queries #338
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just raising this pull request to get some feedback and opinions on the best approach to adding the ability to provide custom score queries to a Lucene search.
Idea is to allow global configuration of scoring queries on the LuceneIndexOptions, while also also scoring per searcher when creating a new instance to add to the ExamineManager and also adding them just before building a query directly on a searcher.
On executing the main query it is nested inside any score queries that have been added before being passed on to the LuceneSearchExecutor.
The code is just a very rough stab at a first pass to implement the ability to have custom score queries and already has areas of improvement such as: