Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 38656 invoked from network); 5 Sep 2005 20:40:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2005 20:40:31 -0000 Received: (qmail 51854 invoked by uid 500); 5 Sep 2005 20:40:27 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 51824 invoked by uid 500); 5 Sep 2005 20:40:26 -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 51811 invoked by uid 99); 5 Sep 2005 20:40:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 13:40:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of axelclk@gmail.com designates 64.233.182.195 as permitted sender) Received: from [64.233.182.195] (HELO nproxy.gmail.com) (64.233.182.195) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 13:40:39 -0700 Received: by nproxy.gmail.com with SMTP id i2so174433nfe for ; Mon, 05 Sep 2005 13:40:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=jYyYxAgyjvEq48srwowzbRx2yYRPFF7EVSsbn9heXYntEzV/ANupZXe6w171YgP8b+uMEJwy8CyOfBdHtwejYSzejjbDHOVjhkNVZEKJstf0og4YJy+WOpxtbLx4vRDRLidhv7mnHVOgBpcj0RvGSc0/gqwS7N28+m6La5WV7ys= Received: by 10.48.236.2 with SMTP id j2mr145478nfh; Mon, 05 Sep 2005 13:40:22 -0700 (PDT) Received: by 10.48.43.6 with HTTP; Mon, 5 Sep 2005 13:40:22 -0700 (PDT) Message-ID: <7a49c63505090513407a5801cc@mail.gmail.com> Date: Mon, 5 Sep 2005 22:40:22 +0200 From: Axel Reply-To: axelclk@gmail.com To: java-user@lucene.apache.org Subject: List of values from refix query Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Assuming that in the indexing process I setup 3 different documents doc1, doc2, doc3. with something like: doc1.add(Field.Keyword("variable", "var_no1")); doc1.add(Field.Keyword("variable", "var_test1")); doc2.add(Field.Keyword("variable", "var_no2")); doc2.add(Field.Keyword("variable", "var_test2")); doc3.add(Field.Keyword("variable", "var_no3")); How can I get all values across the documents with a given prefix? For prefix =3D "var" for example I would like to have a list of all 5 value= s. For prefix =3D "var_no" for example I would like to have a list of the valu= es {"var_no1", "var_no2", "var_no3"}. Is there already a method for this case or must the list be merged together from the document Hits for a PrefixQuery? ... Query query =3D new PrefixQuery(new Term("variable", prefix)); Hits hits =3D fSearcher.search(query); .... --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org