Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 2564 invoked from network); 15 Nov 2005 20:38:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 20:38:33 -0000 Received: (qmail 33952 invoked by uid 500); 15 Nov 2005 20:38:28 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 33924 invoked by uid 500); 15 Nov 2005 20:38:27 -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 33913 invoked by uid 99); 15 Nov 2005 20:38:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 12:38:27 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeff.rodenburg@gmail.com designates 66.249.82.205 as permitted sender) Received: from [66.249.82.205] (HELO xproxy.gmail.com) (66.249.82.205) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 12:38:18 -0800 Received: by xproxy.gmail.com with SMTP id s15so1545748wxc for ; Tue, 15 Nov 2005 12:38:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AuOG/Gzs/gVMy2HpOdEKtZ/NloqEHPXUNeQigmNFmdhsad/j+KiLFu1sWfDmy73y1i69bLZM46j9arJuCSo6IHZhUWZe8+iMvcnhMQjqAohh8AmWp6gdKnjcTgB+kJswMJM+z/ALqW6z9c8rZj+6ig0PoVWVTFCVrsfn2MoBZAc= Received: by 10.64.10.8 with SMTP id 8mr7713455qbj; Tue, 15 Nov 2005 12:38:05 -0800 (PST) Received: by 10.65.35.7 with HTTP; Tue, 15 Nov 2005 12:38:05 -0800 (PST) Message-ID: <50f433360511151238t101fb332y198f63eab6b324eb@mail.gmail.com> Date: Tue, 15 Nov 2005 12:38:05 -0800 From: Jeff Rodenburg To: java-user@lucene.apache.org Subject: Re: Items in multiple category: distinct search? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22732_7670942.1132087085558" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_22732_7670942.1132087085558 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi John - It sounds like you're thinking of your index in terms of sql constructs -- multiple rows for the same record. We do this very same thing with categories; if you have a record that lives in multiple categories, just ad= d additional category field/value pairs for your original record. It's ok to use multiple fields with the same name. Once stored, if you want to see records in category "A", just query lucene for category "A". Thinking of it in terms of SQL constructs makes it more difficult than it needs to be. Hope this helps. On 11/15/05, John Powers wrote: > > Hello, I have done a search for this issue, but I didnt really see an > answer. > > if i want to store things in a hierarchy, but i want items to be in > multiple > categories at any level. i'd like to be able to search for an item and > only show it once, but maybe (not required) show what categories the > results > are in. but if i look in a category (search on that category) then i want > to see that item there obviously only the once that it is there. > > so i've got the hierarchy part..but its getting items to be in multiple > categories. i can put them there as duplicate entries of that itemNumber, > however when i search i dont want to get back the 7 times that one item i= s > used.. i dont mind if its in 7 categories and they each show one usage, > but > i'd like for my total hit count to reflect just that this item exists > once... i could iterate through the whole Hits list and put them into a > unique result list, but i'd like lucene to do that for me. any way to do > that? custom filter? i've looked at the query language..i didnt see a > "distinct" clause... > > any help is greatly appreciated. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > ------=_Part_22732_7670942.1132087085558--