FAQ
Hello,

I would like to query based on a start and end date. I was thinking
something like this

start_date: [20000101 TO <todays date>] end_date: [<todays date> TO
20900101]

Would this work for me? Our dates are stored in the index as strings so I
am not sure the syntax above would be correct.

Any assistance would be appreciated.

Thanks,
Joseph Crawford

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Suman Holani at Apr 16, 2010 at 1:31 pm
    Hello Joseph,

    Yes this would work .Range queries could be used for range searches.
    But this is very expensive in terms of performance.

    Regards,
    Suman
    On Fri, 16 Apr 2010 06:23:30 -0700, wrote:
    Hello,

    I would like to query based on a start and end date. I was thinking
    something like this

    start_date: [20000101 TO <todays date>] end_date: [<todays date> TO
    20900101]

    Would this work for me? Our dates are stored in the index as strings so I
    am not sure the syntax above would be correct.

    Any assistance would be appreciated.

    Thanks,
    Joseph Crawford

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Otis Gospodnetic at Apr 21, 2010 at 1:11 pm
    Joseph,

    If you can, get the latest Lucene and use NumericField to index your dates with appropriate precision and then use NumericRangeQueries when searching. This will be faster than searching for string dates in a given range.
    Otis
    ----
    Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
    Lucene ecosystem search :: http://search-lucene.com/


    ----- Original Message ----
    From: "info@josephcrawford.com" <info@josephcrawford.com>
    To: java-user@lucene.apache.org
    Sent: Fri, April 16, 2010 9:23:30 AM
    Subject: Range Query Assistance

    Hello,
    I would like to query based on a start and end date. I was
    thinking
    something like this

    start_date: [20000101 TO <todays
    date>] end_date: [<todays date> TO
    20900101]

    Would this work
    for me? Our dates are stored in the index as strings so I
    am not sure
    the syntax above would be correct.
    Any assistance would be
    appreciated.
    Thanks,
    Joseph
    Crawford
    ---------------------------------------------------------------------
    To
    unsubscribe, e-mail:
    href="mailto:java-user-unsubscribe@lucene.apache.org">java-user-unsubscribe@lucene.apache.org For
    additional commands, e-mail:
    ymailto="mailto:java-user-help@lucene.apache.org"
    href="mailto:java-user-help@lucene.apache.org">java-user-help@lucene.apache.org
    ---------------------------------------------------------------------
    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
postedApr 16, '10 at 1:24p
activeApr 21, '10 at 1:11p
posts3
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase