lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Use SloppyPhraseScorer in SpanNearQuery
Date Fri, 11 Sep 2015 16:40:36 GMT

Perfect, thank you :-) 

I was also wondering if I can take the absolute position of a term in
the scoring calculation in my SpanNearQuery but I am not sure I can
achieve this efficiently with a custom implementation of Similarity. 

I am thinking of two ways to achieve this (please tell me if I am
wrong...) : 

- Duplicate the term position in payload and implement the
computePayload method in Similirity class in order to make it take the
value into account for scoring (I don't like this solution :-) ) 

- Extends the SpanScorer to take the term position into account for the
scoring calculation 

Do you think that one of these approach is valid or do you have another

Thank you, 


Aurélien MAZOYER 

On 11.09.2015 09:40, Alan Woodward wrote: 

> Yes, that's correct. 
> Alan Woodward
> [1]
> On 10 Sep 2015, at 17:11, wrote: Hi,
> Yes, thanks.
> If I want to customize this behavior (remove it or make it more or less important), is
it correct to override the Similarity class to implement a new computeSlopFactor method?
> Thank you for your answer.
> Regards,
> Aurélien MAZOYER
> On 10.09.2015 12:37, Alan Woodward wrote:
> Hi,
> SpanNearQuery will also take into account the 'width' of the match, so
> that terms that are closer together will score more highly. Is that
> what you're looking for?
> Alan Woodward
> [1]
> On 10 Sep 2015, at 10:43, wrote:
> Hi all,
> SpanNearQuery and SloppyPhraseQuery can have similar behavior in some use cases. On the
one hand, I have to distinguish between ordered and unordered terms (that's enabled with SpanNearQuery)
but on the other hand, I want to use the SloppyPhraseScorer, that takes the relative positions
of the terms into account for the score calculation. As far I understood, this is possible
with SloppyPhraseQuery but not with SpanNearQuery. Do you think there is there a way to combine
these two features to have the best of both worlds?
> Thanks!
> Aurélien
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message