alessandrobenedetti commented on a change in pull request #357: [SOLR-12238] 
Synonym Queries boost by payload 
URL: https://github.com/apache/lucene-solr/pull/357#discussion_r376513280
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java
 ##########
 @@ -450,9 +485,13 @@ protected Query analyzePhrase(String field, TokenStream 
stream, int slop) throws
         position += 1;
       }
       builder.add(new Term(field, termAtt.getBytesRef()), position);
+      phraseBoost = boostAtt.getBoost();
 
 Review comment:
   I implemented a simple multiplicative boost.
   It's back compatible with the designed use case (multi term synonym -> 
single concept -> single boost -> e.g. panthera onca => jaguar|0.95, big 
cat|0.85, black panther|0.65))
   
   But it's also compatible in not synonym cases, if the user needs a boost per 
token in phrase and span queries.
   It's in the upcoming commit, let me know if you believe something different 
is necessary

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to