Mailing List Archive

WithinSearch
hi,
some time ago i posted a message about how could be possible implement the within search, the link to the message is:
http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg01042.html

i hope someone can help me.
Thank you very much.
Bye.



--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
Re: WithinSearch [ In reply to ]
Would adding new terms to the previous query using AND not work?

Otis

--- none none <korfut@lycos.com> wrote:
> hi,
> some time ago i posted a message about how could be possible
> implement the within search, the link to the message is:
>
http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg01042.html
>
> i hope someone can help me.
> Thank you very much.
> Bye.
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
>


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
Re: WithinSearch [ In reply to ]
hi,
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 'WithinQueryScorer.java' this one extends PhraseScorer.java.

We need to re-write just 'protected final float phraseFreq()' method.
This will be something similar to the SloppyPhraseScorer.java 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.

So,
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.
Bye.


--

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



--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>