How do you intend to index these? Lucene will not index objects for you. You have to break the object down into a series of fields. At that point you can substitute whatever you want.
Best Erick On Tue, Dec 23, 2008 at 3:36 AM, <amar.sann...@gmail.com> wrote: > 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 <aaron_sc...@yahoo.com> > 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 <erickerick...@gmail.com> > > 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, <amar.sann...@gmail.com> 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-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > > > -- > Amar Sannaik | Programmer | ATHARVA LIBSON Software Pvt Ltd., > # 9886476270, amarsann...@atharvalibson.com >