Re: Performing a query on token length

2011-01-21 Thread Camden Daily
one.) > > > > first_name:??* > > > > The performance would not necessarily be great, but functionally it would > do > > exactly what you asked. > > > > -- Jack Krupansky > > > > -Original Message- From: Camden Daily > >

Re: Performing a query on token length

2011-01-21 Thread Ian Lea
iday, January 21, 2011 10:15 AM > To: java-user@lucene.apache.org > Subject: Performing a query on token length > > Hello all, > > Does anyone know if it is possible in Lucene to do a query based on the > string length of the value of a field? > > For example, if I wanted all inde

Re: Performing a query on token length

2011-01-21 Thread Jack Krupansky
: Friday, January 21, 2011 10:26 AM To: java-user@lucene.apache.org Subject: Re: Performing a query on token length A wildcard query with 10 leading question marks, each of which requires a single character. This would also depend on leading wildcards being enabled in your query parser (if you are using

Re: Performing a query on token length

2011-01-21 Thread Jack Krupansky
do exactly what you asked. -- Jack Krupansky -Original Message- From: Camden Daily Sent: Friday, January 21, 2011 10:15 AM To: java-user@lucene.apache.org Subject: Performing a query on token length Hello all, Does anyone know if it is possible in Lucene to do a query based on the

Re: Performing a query on token length

2011-01-21 Thread Ian Lea
Not directly, but you could index a NumericField called "length" and do a NumericRangeQuery on it. Or loop through all the terms checking length. But that isn't a query and will be slow. -- Ian. On Fri, Jan 21, 2011 at 3:15 PM, Camden Daily wrote: > Hello all, > > Does anyone know if it is p

Performing a query on token length

2011-01-21 Thread Camden Daily
Hello all, Does anyone know if it is possible in Lucene to do a query based on the string length of the value of a field? For example, if I wanted all index matches where a specific field like 'first_name' was between 10 and 20 characters. Thanks! -Camden Daily