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 <[email protected]> wrote: > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
