[ 
https://issues.apache.org/jira/browse/LUCENE-9171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17024182#comment-17024182
 ] 

Alan Woodward commented on LUCENE-9171:
---------------------------------------

Hi [~alessandro.benedetti], thanks for pushing this!  I think we should try and 
keep actual payload handling out of QueryBuilder, as it's a specific 
implementation and QueryBuilder is supposed to be a general base to build on.  
Instead, it would be useful to try and see what we need to change in 
QueryBuilder to allow all of the payload handling to happen in subclasses.

One possibility would be to change the signatures of newTermQuery and 
newSynonymQuery to take an AttributeSource rather than a Term, which would give 
subclasses access to any PayloadAttribute contents.  We should probably take 
another look at analyzeGraphPhrase as well, which currently builds a SpanQuery 
- ideally it should instead build a set of PhraseQueries, as the scoring makes 
more sense (and is more sensibly changed by things like individual term 
payloads).  SpanBoostQuery is fundamentally broken and we should avoid using it 
- I'll open a separate ticket to deprecate and remove it.

> Synonyms Boost by Payload
> -------------------------
>
>                 Key: LUCENE-9171
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9171
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/queryparser
>            Reporter: Alessandro Benedetti
>            Priority: Major
>
> I have been working in the additional capability of boosting queries by terms 
> payload through a parameter to enable it in Lucene Query Builder.
> This has been done targeting the Synonyms Query.
> It is parametric, so it meant to see no difference unless the feature is 
> enabled.
> Solr has its bits to comply thorugh its SynonymsQueryStyles



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to