Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 94603 invoked from network); 31 Jul 2007 08:23:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2007 08:23:43 -0000 Received: (qmail 37911 invoked by uid 500); 31 Jul 2007 08:23:36 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 37864 invoked by uid 500); 31 Jul 2007 08:23:36 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 37840 invoked by uid 99); 31 Jul 2007 08:23:35 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2007 01:23:35 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=FH_HELO_EQ_D_D_D_D,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [202.124.246.50] (HELO 202-124-246-50.dedsvrs.net) (202.124.246.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2007 08:23:29 +0000 Received: (qmail 27394 invoked from network); 31 Jul 2007 18:22:27 +1000 Received: from spectr11.lnk.telstra.net (HELO v) (165.228.154.97) by 202-124-246-50.dedsvrs.net with SMTP; 31 Jul 2007 18:22:27 +1000 From: "Vijay Santhanam" To: References: <1185835808.37787.ezmlm@lucene.apache.org> In-Reply-To: <1185835808.37787.ezmlm@lucene.apache.org> Subject: Exact field searches Date: Tue, 31 Jul 2007 18:23:04 +1000 Message-ID: <011601c7d34c$0423d1a0$0c6b74e0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcfS++mIXKgULI/qQ6Wxk4++3uNJgQAUAFlg Content-Language: en-au X-Virus-Checked: Checked by ClamAV on apache.org Hi Guys, Currently I construct a PrefixQuery to exact search through an index of documents that represent Compact Discs, something like www.discogs.com. On the search page, we offer a suggestion list as the user enters text, like google suggest. When a user selects an item out of this list, we mark the search as being an "exact" search, because they know what they want. An exact search wraps the name of the disc in a PrefixQuery and performs the search. But, I'm getting some unwanted results and I'm not sure which solution approach to use. In our dataset, there are hundreds of CDs with single English word titles. Like, "Pink" and "Dust" and "Walk" etc. If the user selects the "Pink" from the suggestion list, then CDs with titles like "Pink Sunset", "A Pink lady", "Pink McPinkington", "Tomorrow the Pink" appear in the results (along with the CDs just titled "Pink"). Obviously, the PhraseQuery finds instances of that phrase in the title field, but I need to somehow exclude those titles that have a different number of tokens from the query. How do I make search for a specific number of tokens in a field? Thanks for your help, Vijay Santhanam B.Eng.(Soft.) Spectrum Wired - Software Engineer T: +61 2 4925 3266 F: +61 2 4925 3255 M: +61 407 525 087 W: www.spectrumwired.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org