none none <korfut <at> lycos.com>
2002-05-01 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 '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.
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?
On Wed, 1 May 2002 08:28:47
Otis Gospodnetic wrote: