Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 78013 invoked from network); 18 Aug 2008 16:59:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Aug 2008 16:59:29 -0000 Received: (qmail 52489 invoked by uid 500); 18 Aug 2008 16:59:20 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 52461 invoked by uid 500); 18 Aug 2008 16:59:20 -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 52450 invoked by uid 99); 18 Aug 2008 16:59:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2008 09:59:20 -0700 X-ASF-Spam-Status: No, hits=-2.6 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [207.46.51.80] (HELO SG2EHSOBE002.bigfish.com) (207.46.51.80) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2008 16:58:20 +0000 Received: from mail15-sin-R.bigfish.com (10.3.40.3) by SG2EHSOBE002.bigfish.com (10.3.40.22) with Microsoft SMTP Server id 8.1.240.5; Mon, 18 Aug 2008 16:58:46 +0000 Received: from mail15-sin (localhost.localdomain [127.0.0.1]) by mail15-sin-R.bigfish.com (Postfix) with ESMTP id 0EB79AF00A1 for ; Mon, 18 Aug 2008 16:58:46 +0000 (UTC) X-BigFish: VPS-58(zz542N1432R98dR62a3L1447R1805M936fQ3117K9371P12b6izzzzz2dh6bh41i42k43j61h) X-Spam-TCS-SCL: 0:0 Received: by mail15-sin (MessageSwitch) id 1219078723969714_15159; Mon, 18 Aug 2008 16:58:43 +0000 (UCT) Received: from us-voo-smtp05.internal.sungard.corp (unknown [216.83.166.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail15-sin.bigfish.com (Postfix) with ESMTP id 3F29F1AF8058 for ; Mon, 18 Aug 2008 16:58:42 +0000 (UTC) Received: from us-voo-smtp11.internal.sungard.corp ([168.162.128.53]) by us-voo-smtp05.internal.sungard.corp with Microsoft SMTPSVC(6.0.3790.3959); Mon, 18 Aug 2008 12:58:39 -0400 Received: from VOO-EXCHANGE01.internal.sungard.corp ([168.162.128.82]) by us-voo-smtp11.internal.sungard.corp with Microsoft SMTPSVC(6.0.3790.3959); Mon, 18 Aug 2008 12:58:39 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: Testing for field existence Date: Mon, 18 Aug 2008 12:58:37 -0400 Message-ID: <87D5FFD601E4BC488D51E45D414706C7037AFE59@VOO-EXCHANGE01.internal.sungard.corp> In-Reply-To: <19034359.post@talk.nabble.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Testing for field existence Thread-Index: AckBSYtGtk4kywDOSF23XI3KV8GVwAACdT4g From: To: X-OriginalArrivalTime: 18 Aug 2008 16:58:39.0912 (UTC) FILETIME=[A9C7B280:01C90153] X-Virus-Checked: Checked by ClamAV on apache.org Karsten, Thanks for the feedback. Not sure I understand the reasoning behind not using the "XXXX" prefix (do you have a link possibly?). But I see what you are getting at with the additional field. I'll give it a try. Thanks for the help. regards, Bill -----Original Message----- From: Karsten F. [mailto:karsten-lucene@fiz-technik.de]=20 Sent: Monday, August 18, 2008 11:45 AM To: java-user@lucene.apache.org Subject: Re: Testing for field existence Hi Bill, you should not use prefix-query (XXXX*), because in first step lucene would generate a list of all terms in this field, and than search for all this terms. Which is senceless. I would suggest to insert a new field "myFields" which contains as value the names of all fields for this document. So instead of +foo:XXXX* you would search for +myFields:foo This would be very fast. Best regards=20 Karsten Bill.Chesky wrote: >=20 > Hello, >=20 > I am creating fields for documents like this: >=20 > =20 >=20 > String name =3D ... >=20 > String value =3D ... >=20 > doc.add(new Field(name, value, Field.Store.NO, > Field.Index.UN_TOKENIZED)); > ...=20 >=20 > One thing I tried is to change my field creation statement like this: > =20 >=20 > doc.add(new Field(name, "XXXX" + value, Field.Store.NO, > Field.Index.UN_TOKENIZED)); >=20 > =20 > then do a query like this: >=20 >=20 > +foo:XXXX* >=20 >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/Testing-for-field-existence-tp19032939p19034359.ht ml 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 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org