Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 76295 invoked from network); 4 Apr 2007 13:37:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2007 13:37:30 -0000 Received: (qmail 115 invoked by uid 500); 4 Apr 2007 13:37:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 99941 invoked by uid 500); 4 Apr 2007 13:37:29 -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 99930 invoked by uid 99); 4 Apr 2007 13:37:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 06:37:29 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of erickerickson@gmail.com designates 64.233.184.235 as permitted sender) Received: from [64.233.184.235] (HELO wr-out-0506.google.com) (64.233.184.235) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 06:37:20 -0700 Received: by wr-out-0506.google.com with SMTP id 68so143525wra for ; Wed, 04 Apr 2007 06:37:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=EErFhxDwSuCMvCwdWkDg1eCSirNXB8bodNZ5VE07PDU3ZPAvxIqpM2Rt2+BI/rh9sH7fEXRSj0/GDI2CVLh5kvsrEPBDuwlymvCSQlpVkZQsXK3gQ06en+LJ1s611FjvI35UsklYKFzAyeF43CI78we2lumzwsPRX7CZ29E8Bvg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=QxEyut91Vkr8cRz7VrKCneWJTNVr5RXOg0tSj44MIP3EyuNKvCrSTx1HcA5WLEGi0K8Jrl9hUVG/djOapd7V3LP6xAjQZJwN5iYBvfepyBEmGcImCVgOLJT6R812NFiBMiD+TuIVj4yy8TsvWgi4O7KFgsWr0R0LdMeKfZgvip8= Received: by 10.115.89.1 with SMTP id r1mr255015wal.1175693818828; Wed, 04 Apr 2007 06:36:58 -0700 (PDT) Received: by 10.114.58.3 with HTTP; Wed, 4 Apr 2007 06:36:58 -0700 (PDT) Message-ID: <359a92830704040636x602a0225se48e3cf4e58d5dce@mail.gmail.com> Date: Wed, 4 Apr 2007 09:36:58 -0400 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Unique City, State results from index based on zip In-Reply-To: <9828966.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_29706_9738569.1175693818659" References: <9828966.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_29706_9738569.1175693818659 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline The default operator for QueryParser is OR, so what you may really be getting is hits on Mill, and Vally is irrelevant. But this is just a guess, it'd be way more helpful if you told us what your index structure was and what query you actually submitted, for which query.toString is really helpful. And if you haven't gotten a copy of Luke, you should. It'll help you examine your index, see how different queries parse (be sure to set the Analyzer you use in Luke), etc. Erick On 4/3/07, freaktet wrote: > > > I am having the following problem. > I have an index I built from a standard US Zip Code table. > Users can search for any combination of City, State and Zip. > If they search for City, State, I want to find unique results, instead of > one result for every zip code that city state has. > For instance, a search for "Mill Vally, CA" (mispelling on purpose), gives > these results: > 94941, Mill Valley, CA > 29715, Fort Mill, SC > 46365, Mill Creek, IN > 29708, Fort Mill, SC > 94114, Mill Valley, CA... etc. Notice the duplicates. > > Any suggestions? > -- > View this message in context: > http://www.nabble.com/Unique-City%2C-State-results-from-index-based-on-zip-tf3523168.html#a9828966 > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > ------=_Part_29706_9738569.1175693818659--