Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 45181 invoked from network); 7 Oct 2008 01:41:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Oct 2008 01:41:47 -0000 Received: (qmail 58538 invoked by uid 500); 7 Oct 2008 01:41:39 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 58489 invoked by uid 500); 7 Oct 2008 01:41:39 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 58480 invoked by uid 99); 7 Oct 2008 01:41:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Oct 2008 18:41:39 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 01:40:36 +0000 Received: by ehatchersolutions.com (Postfix, from userid 504) id DE9E130EFC19; Mon, 6 Oct 2008 19:40:40 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on javelina X-Spam-Level: Received: from [10.0.1.198] (va-69-68-189-221.dyn.embarqhsd.net [69.68.189.221]) by ehatchersolutions.com (Postfix) with ESMTP id C9D4730EFC16 for ; Mon, 6 Oct 2008 19:40:39 -0600 (MDT) Message-Id: From: Erik Hatcher To: java-dev@lucene.apache.org In-Reply-To: <009d01c9281d$2ac906f0$805b14d0$@fco.ramirez@rightalternatives.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Subject: Re: Can I filter the results returned by IndexReader.terms(field) using a field? Date: Mon, 6 Oct 2008 21:40:37 -0400 References: <009d01c9281d$2ac906f0$805b14d0$@fco.ramirez@rightalternatives.com> X-Mailer: Apple Mail (2.928.1) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00, DNS_FROM_SECURITYSAGE,RCVD_IN_SORBS_DUL autolearn=no version=3.1.1 Code in an end to the numeration when the first term from a different field arrives. Different fields will not be interleaved. Erik On Oct 6, 2008, at 9:36 PM, Luis Fco. Ramirez Daza Gonzalez wrote: > Hi > > I use IndexReader.Terms() to get all the terms in the index and then > I iterate through the list and get only those terms for a specific > field. > Is there a way to get the terms for a particular field? Otherwise I > have to read all the terms in the index just to get the terms of a > field. Something like> > > TermEnum termEnum = reader.terms(""); > > I need this because I want to show a list of all the terms available > in some fields, so the user can select from a list or from an > autocomplete textbox. > > Thanks in advance for your help. > > Luis --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org