You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Alan Woodward (Jira)" <ji...@apache.org> on 2020/02/03 10:01:00 UTC

[jira] [Commented] (LUCENE-9171) Synonyms Boost by Payload

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

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

Thanks [~alessandro.benedetti]

I think David is right about AttributeSource here, it makes things a bit overly complicated.  Seeing as what we're really interested in here is boosts, and we in fact already have a `BoostAttribute` in core, let's instead try passing those around instead?  So we change `newTermQuery(Term t)` to `newTermQuery(Term t, float boost)`, and similar for `newSynonymQuery(Term[] terms, float[] boosts)` and possibly in `analyzePhraseQuery` as well.  I think we should leave the graph queries alone for the moment, as boosting there is more complex. 

The Solr implementation can then use a new `PayloadToBoostFilter` that translates the values in the PayloadAttribute to a boost in the BoostAttribute, and everything should get passed through correctly.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org