lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "none none" <>
Subject Re: WithinSearch
Date Wed, 01 May 2002 15:48:23 GMT
doesn't work because if you add an 'AND nextterm' this will not check if the 'nextterm' is
 in the next <n> words, the only guarantee you have is that 'nextterm' is in the document.

I have just problem re-writing the QueryParser.jj and implementing the ''
this one extends

We need to re-write just 'protected final float phraseFreq()' method.
This will be something similar to the implementation, 
with one difference, it should make sure that the 'nextterm' position is bigger than 'previousterm'
BUT Position(nextterm) - Position(previousterm) <= [within number]. 
The SloppyPhraseScorer doesn't care about the order, also the comment in the code say:

The slop is in fact an edit-distance, where the units correspond to
    moves of terms in the query phrase out of position.  For example, to switch
    the order of two words requires two moves (the first move places the words
    atop one another), so to permit re-orderings of phrases, the slop must be
    at least two.

how can we have back an instance of WithinQuery from the QueryParser ?
how we should write the 'phraseFreq()' method handle that check on the positions?

Thank you.


On Wed, 1 May 2002 08:28:47   
 Otis Gospodnetic wrote:
>Would adding new terms to the previous query using AND not work?
>--- none none <> wrote:
>> hi,
>> some time ago i posted a message about how could be possible
>> implement the within search, the link to the message is:
>> i hope someone can help me.
>> Thank you very much.
>> Bye.
>> --
>> To unsubscribe, e-mail:  
>> <>
>> For additional commands, e-mail:
>> <>
>Do You Yahoo!?
>Yahoo! Health - your guide to health and wellness
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message