Repository navigation
Translate function_score with one function over match_all into a Solr function query - #178
Open
serhiy-bzhezytskyy wants to merge 3 commits into
Open
serhiy-bzhezytskyy wants to merge 3 commits into
serhiy-bzhezytskyy wants to merge 3 commits into
Conversation
… function query
A converted function_score became q=*:*, so the operation matched every document with a constant score and measured none of the scoring. A function_score whose query is match_all, or absent, and that has a single field_value_factor (any modifier) or a gauss, exp or linear decay on a geo point now becomes {!func} with the same function. Each form was compared with OpenSearch document by document. Anything else (several functions, weight, missing, numeric or date decays, a scoring inner query) stays untranslated with the warning.
…tion-score-to-func # Conflicts: # tests/unit/solr/test_workload_converter.py
# Conflicts: # tests/unit/solr/test_workload_converter.py
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A converted
function_scorebecameq=*:*, so the operation matched every document with a constant score and measured none of the scoring. Afunction_scorewhose query ismatch_all(or absent) and that has a singlefield_value_factor(any modifier) or agauss,exporlineardecay on a geo point now becomes{!func}with the same function. Withmatch_allevery document scores 1, soboost_modedoes not change the result. Anything else (several functions,weight,missing, numeric or date decays, a scoring inner query) stays untranslated with the existing warning.Each form was compared with OpenSearch on the same geonames documents, score by score: the ten modifiers,
gaussandexpagree to a relative 1.4e-06 or better, andlinearto an absolute 1.7e-07. For geonames' two operations the converter now writes what solr-orbit-workloads ships, and over 300 documents each its scores match OpenSearch's to 1.4e-07 (field_value_factor) and 3.3e-06 (gauss). The new tests fail without the change.