Hi

Take a look at PhraseQuery or SpanNearQuery, particularly the
setSlop() methods and the inOrder flag on the latter.
http://www.lucidimagination.com/blog/2009/07/18/the-spanquery/ is well
worth reading.


--
Ian.


On Mon, May 3, 2010 at 8:20 PM, Pablo <[email protected]> wrote:
> Hello,
>
> Lucene core doesn't seems to use relative word positioning (?) for scoring.
>
> For example, indexing that phrase "a b c d e f g h i j k l m n o p q r
> s t u v w x y z", these queries give the same results (0.19308087) :
>  - 1 : phrase:'e f g'
>  - 2 : phrase:'o k z'
>
> I'm a bit familiar with lucene and snowballs, but I never (really)
> needed this feature before, and didn't browse the lucene contribs.
>
> Maybe I'm misunderstanding something, but, what can I do to obtain
> query 1 get a better score than the second ?
>
> Should I implement a Scorer and or a Similarity, or can an analyser
> and a specific stemmer be sufficient?
>
>
> Thanks, [I first wrote to dev, wasn't the right place.]
>
> Pablo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

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

Reply via email to