From java-user-return-46986-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Tue Aug 10 19:41:22 2010 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 42327 invoked from network); 10 Aug 2010 19:41:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Aug 2010 19:41:21 -0000 Received: (qmail 42388 invoked by uid 500); 10 Aug 2010 19:41:19 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 42315 invoked by uid 500); 10 Aug 2010 19:41:19 -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 42305 invoked by uid 99); 10 Aug 2010 19:41:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 19:41:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-lucene-user@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 19:41:11 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oiugl-0002C4-1U for java-user@lucene.apache.org; Tue, 10 Aug 2010 21:40:43 +0200 Received: from poste70.vl.videotron.net ([207.96.202.70]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Aug 2010 21:40:43 +0200 Received: from duperval by poste70.vl.videotron.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Aug 2010 21:40:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: java-user@lucene.apache.org From: L Duperval Subject: Partial matching with spaces Date: Tue, 10 Aug 2010 19:40:31 +0000 (UTC) Lines: 24 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 207.96.202.70 (Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)) I am using Compass which uses Lucene 2.4.1. We are trying to implement "find as you type" searching. So for example, if I have documents containing the following: Newfoundland New Mexico New York New Yorkshire If a user types "New" all four documents are returned. When the user adds a space, only the last three are returned. After typing "Y" the last two show up, and so on. It works, as long as there isn't a space in the query. Once there is a space, nothing matches until the "k" in "New York" is added. And then, only "New York" is returned, "New Yorkshire" isn't. Is there a way to do this with Lucene? If so, then I can try to make it work similarly in Compass. Thanks, L --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org