lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: One direction phrase searches
Date Wed, 03 Sep 2003 03:39:55 GMT
Because I'm really interested in the guts of Lucene, I dug even 
deeper....

On Tuesday, September 2, 2003, at 07:39  PM, Erik Hatcher wrote:
>> Is there anyway to make the system respond only to the order of the
>> terms as entered in the query?
>
> I'm sure there is a way to make an OrderedPhraseQuery, although I'll 
> need to do some more homework myself to craft such a thing.  All the 
> information to do such a thing is available, although maybe it 
> wouldn't be as performant as PhraseQuery (just a guess, no facts to 
> back that up yet).

PhraseQuery uses a SloppyPhraseScorer, and its phaseFreq method is what 
makes the order not matter.  I'm pretty sure a new OrderedPhraseQuery 
that subclassed PhraseQuery and overrode createWeight and did something 
similar to the SloppyPhraseScorer would do the trick.

	Erik


Mime
View raw message