Do your time range query, sort by the time field as "descending", and take the first result.

-- Jack Krupansky

-----Original Message----- From: Alok Bhandari
Sent: Wednesday, July 24, 2013 9:08 AM
To: solr-user@lucene.apache.org
Subject: how to get unique latest results from solr


Hello All,

I am using solr 4.0. I have a data in my solrindex where on each review of a
document a new entry for a document is added in solr , here document also
have a field which holds employee_id and entry also holds the timestamp of
when that record is added.

Now I want to query this index in a way that I can specify two time ranges
t1-t2 and get latest entry for  employee_id in this time-range. So in the
given time-range document might have been updated multiple times , but I
want latest entry.

Is there any know way to achieve this.

Thanks

Alok



--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-get-unique-latest-results-from-solr-tp4080034.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to