Re: Query any data

2009-04-10 Thread Tim Williams
2009/4/10 Matthew Hall : > I think I would tackle this in a slightly different manner. > > When you are creating this index, make sure that that field has a > default value. Make sure this value is something that could never appear > in the index otherwise. Then, when you goto place this field into

Re: Query any data

2009-04-10 Thread Matthew Hall
I think I would tackle this in a slightly different manner. When you are creating this index, make sure that that field has a default value. Make sure this value is something that could never appear in the index otherwise. Then, when you goto place this field into the index, either write out your

Re: Query any data

2009-04-09 Thread Erick Erickson
searching for fieldname:* will be *extremely* expensive as it will, by default, build a giant OR clause consisting of every term in the field. You'll throw MaxClauses exceptions right and left. I'd follow Tim's thread lead first Best Erick 2009/4/8 王巍巍 > first you should change your querypa

Re: Query any data

2009-04-08 Thread 王巍巍
first you should change your querypaser to accept wildcard query by calling method of QueryParser setAllowLeadingWildcard then you can query like this: fieldname:* 2009/4/9 Tim Williams > On Wed, Apr 8, 2009 at 11:45 AM, addman wrote: > > > > Hi, > > Is it possible to create a quer

Re: Query any data

2009-04-08 Thread Tim Williams
On Wed, Apr 8, 2009 at 11:45 AM, addman wrote: > > Hi, > Is it possible to create a query to search a field for any value? I just > need to know if the optional field contain any data at all. google for: lucene field existence There's no way built in, one strategy[1] is to have a 'meta field