Re: Sorting dates with reduced precision

2009-04-23 Thread tarjei
On 04/22/2009 03:20 PM, Ensdorf Ken wrote: Yes, but dates are fairly spesific, say 06:45 Nov. 2 , 2009. What if I want to say Sort so that withing entries for Nov. 2 , you sort by relevance for example? Append /DAY to the date value you index, for example 1995-12-31T23:59:59Z/DAY will yield

RE: Sorting dates with reduced precision

2009-04-23 Thread Ensdorf Ken
Yes, but dates are fairly spesific, say 06:45 Nov. 2 , 2009. What if I want to say Sort so that withing entries for Nov. 2 , you sort by relevance for example? Append /DAY to the date value you index, for example 1995-12-31T23:59:59Z/DAY will yield 1995-12-31 So that all

Sorting dates with reduced precision

2009-04-22 Thread tarjei
Hi, I got a set of entries where I want to sort them both by the day they were entered into solr(stored as a Solr date) and also by another field. Is this possible or do I have to create a separate field with lower resolution? kind regards, Tarjei

Re: Sorting dates with reduced precision

2009-04-22 Thread Markus Jelsma - Buyways B.V.
AFAIK, according to the manual you can add multiple sort instructions: http://wiki.apache.org/solr/CommonQueryParameters#head-9f40612b42721ed9e1979a4a80d68f4f8524e9b4 - Markus Jelsma Buyways B.V. Tel. 050-3118123 Technisch ArchitectFriesestraatweg 215c

Re: Sorting dates with reduced precision

2009-04-22 Thread tarjei
On 04/22/2009 02:57 PM, Markus Jelsma - Buyways B.V. wrote: AFAIK, according to the manual you can add multiple sort instructions: http://wiki.apache.org/solr/CommonQueryParameters#head-9f40612b42721ed9e1979a4a80d68f4f8524e9b4 Yes, but dates are fairly spesific, say 06:45 Nov. 2 , 2009. What if

RE: Sorting dates with reduced precision

2009-04-22 Thread Ensdorf Ken
Yes, but dates are fairly spesific, say 06:45 Nov. 2 , 2009. What if I want to say Sort so that withing entries for Nov. 2 , you sort by relevance for example? Append /DAY to the date value you index, for example 1995-12-31T23:59:59Z/DAY will yield 1995-12-31 So that all documents with the

Re: Sorting dates with reduced precision

2009-04-22 Thread Markus Jelsma - Buyways B.V.
Perhaps i don't see your problem but if you convert the dates to UNIX timestamps, you could use a range query to narrow your results to within a specific date. - Markus Jelsma Buyways B.V. Tel. 050-3118123 Technisch ArchitectFriesestraatweg 215c Fax.

Re: Sorting dates with reduced precision

2009-04-22 Thread Markus Jelsma - Buyways B.V.
my bad, there are indeed some very nice features concerning datefields and processing although they aren't really thorougly documented in the wiki. http://wiki.apache.org/solr/IndexingDates http://lucene.apache.org/solr/api/org/apache/solr/util/DateMathParser.html some additional information