: 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
Subject: Re: Query time only Ranges
: I am working on use case - wherein i need to Query to just time ranges
: without date component.
:
: search for docs with between 4pm - 6pm
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
: I am working on use case - wherein i need to Query to just time ranges
: without date component.
:
: search for docs with between 4pm - 6pm
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 t
In that case, you could just calculate an offset from 00:00:00 in
seconds (ignore the date)
Pretty simple.
On Wed, Mar 31, 2010 at 4:57 PM, abhatna...@vantage.com
wrote:
>
> Hi Sashi,
> Could you elaborate point no .1 in the light of case where in a field should
> have just time?
>
>
> Ankit
>
>
Hi Sashi,
Could you elaborate point no .1 in the light of case where in a field should
have just time?
Ankit
--
View this message in context:
http://n3.nabble.com/Query-time-only-Ranges-tp688831p689413.html
Sent from the Solr - User mailing list archive at Nabble.com.
I suggest approaching it thus:
1. Create a datetime offset from a baseline date (say Jan 1, 1900,
00:00:00) and store the date diff in secs from that date-time.
2. Use numeric range query. I find this approach works faster and
would also give you the granularity you want.
On Wed, Mar 31, 2010
One issue though – first I need precision upto seconds.
Also does anybody knows that performance issue involved with this
granularity.
How about the approach of breaking date time field into fields like hours,
mins, secs
Ankit
--
View this message in context:
http://n3.nabble.com/Query-time
, 2010 12:36:22 PM
Subject: Re: Query time only Ranges
Hi Ankit,
Try the following approach.
create a query like - [01/01/1900T16:00:00Z/HOUR TO 01/01/1900T18:00:00Z/HOUR ]
Solr will automatically will take care of Rounding off to the HOUR specified.
For eg:
the query - [01/01/1900T16:43:42Z/HOUR TO
Hi Ankit,
Try the following approach.
create a query like - [01/01/1900T16:00:00Z/HOUR TO 01/01/1900T18:00:00Z/HOUR ]
Solr will automatically will take care of Rounding off to the HOUR specified.
For eg:
the query - [01/01/1900T16:43:42Z/HOUR TO 01/01/1900T18:55:23Z/HOUR ]
would be equivalent t