Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 54534 invoked from network); 4 Mar 2009 19:52:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2009 19:52:20 -0000 Received: (qmail 1430 invoked by uid 500); 4 Mar 2009 19:52:05 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 1408 invoked by uid 500); 4 Mar 2009 19:52:05 -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 1390 invoked by uid 99); 4 Mar 2009 19:52:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 11:52:05 -0800 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 erickerickson@gmail.com designates 209.85.198.231 as permitted sender) Received: from [209.85.198.231] (HELO rv-out-0506.google.com) (209.85.198.231) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 19:51:55 +0000 Received: by rv-out-0506.google.com with SMTP id k40so5268858rvb.5 for ; Wed, 04 Mar 2009 11:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=3GO4lLwyBPBq3OMqOS5sltrWVIsjCHuYR/11LX62+Qc=; b=HO960a+/oDeMxyoCs0Sw6IJ4ChdhqVsMY5Rbx6EXhR/73kAOh4bmMNh0HG/bJ4VNi+ A9ee46OkQYcuMTUPUNdAcmdczEfRgAJjXoIlsf+6cHOpnvdqPdnende4mfbgcFHgbiSg o4pBe6p8EnFDrU4UJTy3/TB+h3eFT1kt30ey0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=IwjKeBUdGgigcckwo765Y/b42jlTQ5nRqJJJ8ma6h2QRGxK2846ZRGeJrFAdlk9mae NVY+av6FXi133k/QA4boFoaubgMMF/Km5uX4ta/vO7052pteTXST5/6dHgQr2vH+RbTw JNQ+U8P+EPVg7vbYRHF1uT0znVc6lzlX3SB98= MIME-Version: 1.0 Received: by 10.141.71.14 with SMTP id y14mr131299rvk.23.1236196293705; Wed, 04 Mar 2009 11:51:33 -0800 (PST) In-Reply-To: References: <68959F25CDEBCB4F917D5A253291D73E0D831446C2@BLRKECMBX06.ad.infosys.com> <49AEC7E1.8030901@gmail.com> <4d19a3630903041031k1951cafg668c750217e5cdb5@mail.gmail.com> Date: Wed, 4 Mar 2009 14:51:33 -0500 Message-ID: <359a92830903041151y2bf7dce6kea83d0ae226de284@mail.gmail.com> Subject: Re: Optimum way to find all document without particular field From: Erick Erickson To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd1d506f580f704645060cf X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1d506f580f704645060cf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Remember, though, that this won't work *unless* there is a value to exclude, thus several of the suggestions to index a special token in the relevant field that's guaranteed to not be something you ever want to legitimately search on. Erick On Wed, Mar 4, 2009 at 2:10 PM, Uwe Schindler wrote: > To find all document, that not contain a term, you can combine a > MatchAllDocsQuery with BooleanClause.Occur.MUST, combined with one or more > TermQueries with BooleanClause.Occur.MUST_NOT (the terms you do not want in > the documents). > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: uwe@thetaphi.de > > > -----Original Message----- > > From: shashi.mit@gmail.com [mailto:shashi.mit@gmail.com] On Behalf Of > > Shashi Kant > > Sent: Wednesday, March 04, 2009 7:31 PM > > To: java-user@lucene.apache.org > > Subject: Re: Optimum way to find all document without particular field > > > > A simple solution would be to store the string "NULL" instead of null and > > then query. > > > > > > On Wed, Mar 4, 2009 at 1:26 PM, Chris Lu wrote: > > > > > Allahbaksh, > > > > > > If you ONLY want to find all document with a particular field that is > > not > > > null, you can loop through the TermEnum and TermDocs to find all the > > > document ids. > > > But this can not easily be combined with other queries. > > > > > > -- > > > > > > Chris Lu > > > > > > ------------------------- > > > > > > Instant Scalable Full-Text Search On Any Database/Application > > > > > > site: http://www.dbsight.net > > > > > > demo: http://search.dbsight.com > > > > > > Lucene Database Search in 3 minutes: > > > > > > http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3 > > _minutes > > > > > > DBSight customer, a shopping comparison site, (anonymous per request) > > got > > > 2.6 Million Euro funding! > > > > > > > > > > > > > > > Allahbaksh Mohammedali Asadullah wrote: > > > > > >> Hi, > > >> What is the optimum way in which I can find all the document which has > > >> particular field in it. > > >> > > >> Example > > >> I want to find all the document in which the field text is not null. > > >> > > >> Regards, > > >> Allahbaksh > > >> > > >> Allahbaksh Mohammedali Asadullah, > > >> Software Engineering & Technology Labs, > > >> Infosys Technolgies Limited, Electronics City, > > >> Hosur Road, Bangalore 560 100, India. > > >> *Board: +91-80-28520261 | Extn: 53915 | Direct: 41173915. > > >> Fax: +91-80-28520362 | Mobile: +91-9845505322. > > >> http://setlabs/slim/ > > >> http://allahbaksh.blogspot.com > > >> > > >> > > >> > > >> > > >> > > >> **************** CAUTION - Disclaimer ***************** > > >> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended > > >> solely for the use of the addressee(s). If you are not the intended > > >> recipient, please notify the sender by e-mail and delete the original > > >> message. Further, you are not to copy, disclose, or distribute this e- > > mail > > >> or its contents to any other person and any such actions are unlawful. > > This > > >> e-mail may contain viruses. Infosys has taken every reasonable > > precaution to > > >> minimize this risk, but is not liable for any damage you may sustain > as > > a > > >> result of any virus in this e-mail. You should carry out your own > virus > > >> checks before opening the e-mail or attachment. Infosys reserves the > > right > > >> to monitor and review the content of all messages sent to or from this > > >> e-mail address. Messages sent to or from this e-mail address may be > > stored > > >> on the Infosys e-mail system. > > >> ***INFOSYS******** End of Disclaimer ********INFOSYS*** > > >> > > >> > > >> > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --000e0cd1d506f580f704645060cf--