FAQ
Hello,
I need some help doing a search.
Say I have a really simple document structure, just 1 field, labeled name.
I need to retrieve all the names whose length is more or less than a
specified value. By length I mean String.length().
A range filter seems close in concept, but I couldn't find a good example to
write my specific case.
Thanks for the help,
Federico

Search Discussions

  • Ian Lea at Jul 13, 2011 at 8:37 am
    Store the string length as a NumericField with each document and use
    NumericRangeQuery. There are examples in the javadocs.


    --
    Ian.


    On Tue, Jul 12, 2011 at 10:57 PM, Federico Schroder
    wrote:
    Hello,
    I need some help doing a search.
    Say I have a really simple document structure, just 1 field, labeled name.
    I need to retrieve all the names whose length is more or less than a
    specified value. By length I mean String.length().
    A range filter seems close in concept, but I couldn't find a good example to
    write my specific case.
    Thanks for the help,
    Federico
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 12, '11 at 9:58p
activeJul 13, '11 at 8:37a
posts2
users2
websitelucene.apache.org

2 users in discussion

Ian Lea: 1 post Federico Schroder: 1 post

People

Translate

site design / logo © 2022 Grokbase