开发者

Date Format to index in lucene

开发者 https://www.devze.com 2023-01-28 17:34 出处:网络
I am using lucene to search date ranges. I want to know how should I take date to index it. When I want to index it in all 开发者_StackOverflow中文版resolution ie. Year,Month,Day,Hour,Minute,second,Mi

I am using lucene to search date ranges. I want to know how should I take date to index it. When I want to index it in all 开发者_StackOverflow中文版resolution ie. Year,Month,Day,Hour,Minute,second,Millisecond


The data you're indexing provides time information up to the Millisecond? The only sort of data that I can think of that provides that sort of precise information is something like a list of benchmarking results or maybe you're searching through best times of an auto race or something.

At this point I don't think you should use Lucene if you're only looking to search date ranges. A relational database performs quite well for this.

You can still keep Lucene for full-text search stuff, and use something else for date ranges (MySQL).

Here's just a reference from Lucene's site:

In a query form, fields which are general text should use the query parser. All others, such as date ranges, keywords, etc. are better added directly through the query API.

0

精彩评论

暂无评论...
验证码 换一张
取 消