lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject RE: Query time only Ranges
Date Mon, 05 Apr 2010 18:30:21 GMT

: Actually I needed time upto seconds granularity, so did you mean I 
: should index the field after conversion into seconds

it doesnt' relaly matter what granularity you need -- the point is if you 
need to query for things based on time of day, independent of hte actual 
date, then the best way to do this is probably to ignore the Solr 
DateField completely and just use a numeric field to index some unit of 
time as a number (it doesn't matter wether it's hours, minutes, seconds, 
or milliseconds -- use whatever makes hte most sense for your needs)

: if you only need to store the hour of the day, and query on the hour of 
: the day, then i would just use a numeric integer field containing the hour 
: of the day.
: if you want minute or second (even even millisecond) granularity, but you 
: still only care abotu the time of day (and note the *date*) then i would 
: still use an integer field, and just index the numeric value in whatever 
: granualrity you need.


View raw message