You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ryan Cutter <ry...@gmail.com> on 2014/07/31 01:26:16 UTC
Index a time/date range
Is there a way to index time or date ranges? That is, assume 2 docs:
#1: date = 2014-01-01
#2: date = 2014-02-01 through 2014-05-01
Would there be a way to index #2's date as a single field and have all the
search options you usually get with time/date?
One strategy could be to index the start and stop values separately. Just
wondering if there's a fancier option out there.
Thanks, Ryan
Re: Index a time/date range
Posted by Ryan Cutter <ry...@gmail.com>.
Great resources, thanks everyone!
On Wed, Jul 30, 2014 at 8:12 PM, david.w.smiley@gmail.com <
david.w.smiley@gmail.com> wrote:
> The wiki page on the technique cleans up some small errors from Hoss’s
> presentation:
> http://wiki.apache.org/solr/SpatialForTimeDurations
>
> But please try Solr trunk which has first-class support for date durations:
> https://issues.apache.org/jira/browse/SOLR-6103
> Soonish I’ll back-port to 4x.
>
> ~ David Smiley
> Freelance Apache Lucene/Solr Search Consultant/Developer
> http://www.linkedin.com/in/davidwsmiley
>
>
> On Wed, Jul 30, 2014 at 7:29 PM, Jost Baron <jo...@gmx.de> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi Ryan,
>>
>> On 07/31/2014 01:26 AM, Ryan Cutter wrote:
>> > Is there a way to index time or date ranges? That is, assume 2
>> > docs:
>> >
>> > #1: date = 2014-01-01 #2: date = 2014-02-01 through 2014-05-01
>> >
>> > Would there be a way to index #2's date as a single field and have
>> > all the search options you usually get with time/date?
>> >
>> > One strategy could be to index the start and stop values
>> > separately. Just wondering if there's a fancier option out there.
>>
>> Take a look at this:
>>
>>
>> https://people.apache.org/~hossman/spatial-for-non-spatial-meetup-20130117/
>>
>> Regards,
>> Jost
>>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iEYEARECAAYFAlPZf94ACgkQNme/yCvmvTIp9ACfeuKfCRFuGY/Y2aLH6BxtkS+c
>> kNMAoIcWFuJnnwV8ouajvTUXojR6HiTo
>> =EKfo
>> -----END PGP SIGNATURE-----
>>
>
>
Re: Index a time/date range
Posted by "david.w.smiley@gmail.com" <da...@gmail.com>.
The wiki page on the technique cleans up some small errors from Hoss’s
presentation:
http://wiki.apache.org/solr/SpatialForTimeDurations
But please try Solr trunk which has first-class support for date durations:
https://issues.apache.org/jira/browse/SOLR-6103
Soonish I’ll back-port to 4x.
~ David Smiley
Freelance Apache Lucene/Solr Search Consultant/Developer
http://www.linkedin.com/in/davidwsmiley
On Wed, Jul 30, 2014 at 7:29 PM, Jost Baron <jo...@gmx.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ryan,
>
> On 07/31/2014 01:26 AM, Ryan Cutter wrote:
> > Is there a way to index time or date ranges? That is, assume 2
> > docs:
> >
> > #1: date = 2014-01-01 #2: date = 2014-02-01 through 2014-05-01
> >
> > Would there be a way to index #2's date as a single field and have
> > all the search options you usually get with time/date?
> >
> > One strategy could be to index the start and stop values
> > separately. Just wondering if there's a fancier option out there.
>
> Take a look at this:
>
> https://people.apache.org/~hossman/spatial-for-non-spatial-meetup-20130117/
>
> Regards,
> Jost
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlPZf94ACgkQNme/yCvmvTIp9ACfeuKfCRFuGY/Y2aLH6BxtkS+c
> kNMAoIcWFuJnnwV8ouajvTUXojR6HiTo
> =EKfo
> -----END PGP SIGNATURE-----
>
Re: Index a time/date range
Posted by Jost Baron <jo...@gmx.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Ryan,
On 07/31/2014 01:26 AM, Ryan Cutter wrote:
> Is there a way to index time or date ranges? That is, assume 2
> docs:
>
> #1: date = 2014-01-01 #2: date = 2014-02-01 through 2014-05-01
>
> Would there be a way to index #2's date as a single field and have
> all the search options you usually get with time/date?
>
> One strategy could be to index the start and stop values
> separately. Just wondering if there's a fancier option out there.
Take a look at this:
https://people.apache.org/~hossman/spatial-for-non-spatial-meetup-20130117/
Regards,
Jost
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlPZf94ACgkQNme/yCvmvTIp9ACfeuKfCRFuGY/Y2aLH6BxtkS+c
kNMAoIcWFuJnnwV8ouajvTUXojR6HiTo
=EKfo
-----END PGP SIGNATURE-----
Re: Index a time/date range
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
For fancier versions, some people used geo coordinates to represent start
on X axis and stop on Y. Then use perimeter bounds to do overlaps.
There was a discussion on the list about that a while ago.
Regards,
Alex
On 31/07/2014 6:26 am, "Ryan Cutter" <ry...@gmail.com> wrote:
> Is there a way to index time or date ranges? That is, assume 2 docs:
>
> #1: date = 2014-01-01
> #2: date = 2014-02-01 through 2014-05-01
>
> Would there be a way to index #2's date as a single field and have all the
> search options you usually get with time/date?
>
> One strategy could be to index the start and stop values separately. Just
> wondering if there's a fancier option out there.
>
> Thanks, Ryan
>