Return-Path: Delivered-To: apmail-incubator-lucene-net-user-archive@minotaur.apache.org Received: (qmail 7323 invoked from network); 22 Oct 2009 21:28:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Oct 2009 21:28:40 -0000 Received: (qmail 86264 invoked by uid 500); 22 Oct 2009 21:28:40 -0000 Delivered-To: apmail-incubator-lucene-net-user-archive@incubator.apache.org Received: (qmail 86209 invoked by uid 500); 22 Oct 2009 21:28:40 -0000 Mailing-List: contact lucene-net-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-user@incubator.apache.org Delivered-To: mailing list lucene-net-user@incubator.apache.org Received: (qmail 86199 invoked by uid 99); 22 Oct 2009 21:28:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 21:28:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Eric.Advincula@co.mohave.az.us designates 199.104.207.4 as permitted sender) Received: from [199.104.207.4] (HELO grpwise.co.mohave.az.us) (199.104.207.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 21:28:31 +0000 Received: from Mohave-MTA by grpwise.co.mohave.az.us with Novell_GroupWise; Thu, 22 Oct 2009 14:28:09 -0700 Message-Id: <4AE06BD3.9E65.0028.0@co.mohave.az.us> X-Mailer: Novell GroupWise Internet Agent 7.0.2 HP Date: Thu, 22 Oct 2009 14:27:31 -0700 From: "Eric Advincula" To: Subject: RE: How to loop through all the entries for a field References: <4AE01D10.9E65.0028.0@co.mohave.az.us> <002d01ca534b$9d450800$d7cf1800$@com> <4AE06A3A.9E65.0028.0@co.mohave.az.us> In-Reply-To: <4AE06A3A.9E65.0028.0@co.mohave.az.us> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part5F74F853.0__=" X-Virus-Checked: Checked by ClamAV on apache.org --=__Part5F74F853.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable nevermind I figured it out. I did this: =20 while ((term =3D termEnum.Term()) !=3D null) { if (!term.Field().Equals("BookTitle")) break; =20 map =3D new SearchResultMap(); map.Title =3D term.Text(); =20 control.Items.Add(map); =20 termEnum.Next(); } =20 thanks for all the help >>>=20 From: "Eric Advincula" To: Date: 10/22/2009 2:22 PM Subject: RE: How to loop through all the entries for a field It works but continues even after the listing.=20 How do you know if your on your last term? I tried it and it does work = but continues. How do you know to check if its the last entry? Thanks >>>=20 From: "Digy" To: Date: 10/22/2009 12:13 PM Subject: RE: How to loop through all the entries for a field Something like that? Lucene.Net.Index.IndexReader reader =3D Lucene.Net.Index.IndexReader.Open(dir); Lucene.Net.Index.TermEnum tEnum =3D reader.Terms(new Lucene.Net.Index.Term("BookTitle")); do { Lucene.Net.Index.Term t =3D tEnum.Term(); Console.WriteLine(t.Text()); } while (tEnum.Next()); DIGY -----Original Message----- From: Eric Advincula [mailto:Eric.Advincula@co.mohave.az.us]=20 Sent: Thursday, October 22, 2009 6:51 PM To: lucene-net-user@incubator.apache.org=20 Subject: How to loop through all the entries for a field I have a field in called BookTitle. I want to loop through all the = entries without doing a search. I just want to get the list of BookTitle's that = is in this field: I tried IndexReader but MaxDocs() doesnt work because it returns everything= and I have other fields in their which is allot bigger. =20 Thanks !DSPAM:4ae0cbed643304230521955! --=__Part5F74F853.0__=--