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 <cam...@jaunter.com> 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: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to