Return-Path: Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 76541 invoked from network); 3 Sep 2003 03:46:28 -0000 Received: from unknown (HELO c000.snv.cp.net) (209.228.32.65) by daedalus.apache.org with SMTP; 3 Sep 2003 03:46:28 -0000 Received: (cpmta 630 invoked from network); 2 Sep 2003 20:39:55 -0700 Received: from 68.170.78.210 (HELO ehatchersolutions.com) by smtp.hatcher.net (209.228.32.65) with SMTP; 2 Sep 2003 20:39:55 -0700 X-Sent: 3 Sep 2003 03:39:55 GMT Date: Tue, 2 Sep 2003 23:39:55 -0400 Subject: Re: One direction phrase searches Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Erik Hatcher To: "Lucene Users List" Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: <487B2D42-DDC0-11D7-8A10-000393A564E6@ehatchersolutions.com> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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