Friday, October 26, 2012

Apache Lucene - search by concrete date - Stack Overflow

Short answer: there is no "standard" for date query syntax in Lucene. You need to find out the format(s) your app supports.

Long answer: For the last couple years or so, Lucene keeps the numeric data specially encoded. Most likely, the date in the index is kept in the timestamp format. This means the query parser needs to take in the query, chew it and spit out the timestamp. Querying against a raw timestamp is not very practical - at least for humans - and your query parser likely has some pre-defined format it is able to understand.

For example, Solr has a pre-defined set of supported date/time formats and is able to parse those into timestamps.

Don't forget Lucene is just a library and each application (including Solr and the one you are using) is meant to use it the way they like.

Source: http://stackoverflow.com/questions/13057968/apache-lucene-search-by-concrete-date

good friday f/a 18 f 18 crash virginia tenebrae the lake house petrino arkansas roy williams

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.