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 Steve Lewis <sp...@yahoo.com> on 2011/03/03 20:21:53 UTC
Limiting on dates in Solr
I am treating Solr as a NoSQL db that has great search capabilities. I am
querying on a few fields:
1. text (default)
2. type (my own string field)
3. calibration (my own date field)
I'd like to limit the results to only show the calibration using this query:
calibration:[2011-03-03T00:00:00.000Z TO 2011-03-03T59:59:99.999Z]
This mostly works, but a couple of different dates (March 5) seep into the March
3rd results. Is there any way to exclude the other dates, or at least have them
return a lower ranking in the search? I've also tried:
calibration:[2011-03-03T00:00:00.000Z TO 2011-03-03T59:59:99.999Z] AND NOT (
calibration:[* TO 2011-03-03T00:00:00.000Z] OR
calibration:[2011-03-03T59:59:99.999Z TO *])
Which I found suggested on the stackoverflow web site. I've googled a good bit
and nothing seems to be jumping out at me. No one else appears to be trying to
do something similar, so I may just have unrealistic expectations of what a
search engine will do.
Thanks in advance!
Steve
Re: Limiting on dates in Solr
Posted by Steve Lewis <sp...@yahoo.com>.
Ugh. Of course. I fixed that a couple weeks ago, something must have crept back
in!
Thanks a mil!
________________________________
From: Andreas Kemkes <a5...@yahoo.com>
To: solr-user@lucene.apache.org
Sent: Thu, March 3, 2011 4:12:02 PM
Subject: Re: Limiting on dates in Solr
2011-03-03T59:59:99.999Z - shouldn't that be 2011-03-03T23:59:59.999Z
________________________________
From: Steve Lewis <sp...@yahoo.com>
To: solr-user@lucene.apache.org
Sent: Thu, March 3, 2011 11:21:53 AM
Subject: Limiting on dates in Solr
I am treating Solr as a NoSQL db that has great search capabilities. I am
querying on a few fields:
1. text (default)
2. type (my own string field)
3. calibration (my own date field)
I'd like to limit the results to only show the calibration using this query:
calibration:[2011-03-03T00:00:00.000Z TO 2011-03-03T59:59:99.999Z]
This mostly works, but a couple of different dates (March 5) seep into the March
3rd results. Is there any way to exclude the other dates, or at least have them
return a lower ranking in the search? I've also tried:
calibration:[2011-03-03T00:00:00.000Z TO 2011-03-03T59:59:99.999Z] AND NOT (
calibration:[* TO 2011-03-03T00:00:00.000Z] OR
calibration:[2011-03-03T59:59:99.999Z TO *])
Which I found suggested on the stackoverflow web site. I've googled a good bit
and nothing seems to be jumping out at me. No one else appears to be trying to
do something similar, so I may just have unrealistic expectations of what a
search engine will do.
Thanks in advance!
Steve
Re: Limiting on dates in Solr
Posted by Andreas Kemkes <a5...@yahoo.com>.
2011-03-03T59:59:99.999Z - shouldn't that be 2011-03-03T23:59:59.999Z
________________________________
From: Steve Lewis <sp...@yahoo.com>
To: solr-user@lucene.apache.org
Sent: Thu, March 3, 2011 11:21:53 AM
Subject: Limiting on dates in Solr
I am treating Solr as a NoSQL db that has great search capabilities. I am
querying on a few fields:
1. text (default)
2. type (my own string field)
3. calibration (my own date field)
I'd like to limit the results to only show the calibration using this query:
calibration:[2011-03-03T00:00:00.000Z TO 2011-03-03T59:59:99.999Z]
This mostly works, but a couple of different dates (March 5) seep into the March
3rd results. Is there any way to exclude the other dates, or at least have them
return a lower ranking in the search? I've also tried:
calibration:[2011-03-03T00:00:00.000Z TO 2011-03-03T59:59:99.999Z] AND NOT (
calibration:[* TO 2011-03-03T00:00:00.000Z] OR
calibration:[2011-03-03T59:59:99.999Z TO *])
Which I found suggested on the stackoverflow web site. I've googled a good bit
and nothing seems to be jumping out at me. No one else appears to be trying to
do something similar, so I may just have unrealistic expectations of what a
search engine will do.
Thanks in advance!
Steve