Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 23364 invoked from network); 23 Dec 2008 08:37:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Dec 2008 08:37:21 -0000 Received: (qmail 18378 invoked by uid 500); 23 Dec 2008 08:37:14 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 18348 invoked by uid 500); 23 Dec 2008 08:37:14 -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 18337 invoked by uid 99); 23 Dec 2008 08:37:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Dec 2008 00:37:14 -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 amar.sannaik@gmail.com designates 209.85.146.181 as permitted sender) Received: from [209.85.146.181] (HELO wa-out-1112.google.com) (209.85.146.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Dec 2008 08:37:06 +0000 Received: by wa-out-1112.google.com with SMTP id n4so1290746wag.5 for ; Tue, 23 Dec 2008 00:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=oISYqGVRGwWWrKemIrXPbZXiuaqpttZ58GAvI7nDvlM=; b=xUmeGr4q0HPq4UAIVlA4yKRfOCUGWMXJAXx0Xz1M2NixCfP+z2SQPRSUmFL9JyP79X /kcCIujf8YSNr8UJHYQxuFXF4gkm+964A5xT1ShwcU2ecy9I81EhIrHlHFQmme1Jcm6d ahbNxPAahudGoPy/kfVcxKb7rU80Bu2tbef3M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=JYpaIF7DTi1sPGh8cjvlIHaybGmPepCDyUqJedhio/Qjo/vqkqOuxdIQfVm75WHYok yDBhV/K8FW8yvumKM30j1wfaYn7BZjY3l9r3DWMhLBJY9GwdWYz14hCMu29uD55eabx5 /SgtBi2iISAk5Wq5TzbxF534vntZ4xcKPZ12w= Received: by 10.114.36.4 with SMTP id j4mr4625014waj.119.1230021404962; Tue, 23 Dec 2008 00:36:44 -0800 (PST) Received: by 10.114.155.4 with HTTP; Tue, 23 Dec 2008 00:36:44 -0800 (PST) Message-ID: Date: Tue, 23 Dec 2008 14:06:44 +0530 From: amar.sannaik@gmail.com To: java-user@lucene.apache.org Subject: Re: Lucene search problem In-Reply-To: <50984.86344.qm@web50711.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_62738_1261871.1230021404956" References: <359a92830812220558u48cb90eci9b731ee7b79e691@mail.gmail.com> <50984.86344.qm@web50711.mail.re2.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_62738_1261871.1230021404956 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Aaron Schon/EricK, That really make sense to me but it really seems easy if is the string object. See the object structure I have it below hopefully that gives you some idea class Recipe { @DocumentId Integer id; @IndexedEmbedded Chain chain; //gettter and setter } class Chain { @DocumentId Integer id; @Field(index = Index.TOKENIZED, name="chainName") String name; //getter and setter } I am creating index on the recipe object. and for some recipe.m_chain would be null. So can you tell me how do I assign the value "NULLNULNULLNULL" for object chain in recipe. I also was thinking if #FieldBridge help me this way. My plan was to have default value where chain is null as you mentioned. but it does not seems to work for null values. Please suggest Thanks in advance. -Amar On Tue, Dec 23, 2008 at 12:04 AM, Aaron Schon wrote: > I would second Erick's recommendation - create an arbitrary representation > for NULL such as "NULL" (if you are certain the term "NULL" does not occur > in actual docs. Alternatively, use "NULLNULNULLNULL" or something to that > effect. > > > > ----- Original Message ---- > From: Erick Erickson > To: java-user@lucene.apache.org > Sent: Monday, December 22, 2008 8:58:21 AM > Subject: Re: Lucene search problem > > Try searching the mailing list archives for a fuller discussion, but > the short answer is usually to index an unique value for your > "null" entries, then search on that, something totally > outrageous like, say AAABBBCCCDDDEEEFFF. > > Alternatively, you could create, at startup time, a > Filter of all the docs that *do* contain terms for the > field in question, flip the bits and use the Filter in your > searches. (Hint: see TermDocs/TermEnum) > > Best > Erick > > On Mon, Dec 22, 2008 at 8:11 AM, wrote: > > > Hi, > > > > I have problem with lucene search, I am quite new to this. Can some body > > help or just push me to who can please. > > > > Problem what I am facing we need search for object whose attribute > "chain" > > contaning null, but lucene does not help indexing the null values.. > > > > how can I achieve this, or please guide me the alternative way of doing > > this. > > > > Thanks in advance. > > -Amar > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > -- Amar Sannaik | Programmer | ATHARVA LIBSON Software Pvt Ltd., # 9886476270, amarsannaik@atharvalibson.com ------=_Part_62738_1261871.1230021404956--