You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Markus Jelsma <ma...@openindex.io> on 2018/05/23 10:41:54 UTC

Rewrite SynonymQuery to support payloads

Hello,

To support payloads we rewrite SynonymQuery to a pair of SpanTerm queries which we then can wrap in the PayloadScoreQuery. This is not the right way to do this because if both clauses match, both are also scored.  We could try to rewrite SynonymQuery to a SpanOrQuery but i suppose that would also cause both clauses to score if they match.

So, how can i transform a SynonymQuery into something that i can wrap into PayloadScoreQuery on Lucene/Solr 7.x?

Many thanks,
Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Rewrite SynonymQuery to support payloads

Posted by Alessandro Benedetti <be...@gmail.com>.
Hi Markus,
I contributed to Solr this exact part :

https://issues.apache.org/jira/browse/SOLR-12238

Patch and Pull Request is attached but it has not been reviewed yet.
Give it a look, and then we can continue the discussion here!
let me know if you feel your requirement is different !

Cheers

On Wed, May 23, 2018 at 11:41 AM, Markus Jelsma <ma...@openindex.io>
wrote:

> Hello,
>
> To support payloads we rewrite SynonymQuery to a pair of SpanTerm queries
> which we then can wrap in the PayloadScoreQuery. This is not the right way
> to do this because if both clauses match, both are also scored.  We could
> try to rewrite SynonymQuery to a SpanOrQuery but i suppose that would also
> cause both clauses to score if they match.
>
> So, how can i transform a SynonymQuery into something that i can wrap into
> PayloadScoreQuery on Lucene/Solr 7.x?
>
> Many thanks,
> Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
--------------------------

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England