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 shruti suri <er...@gmail.com> on 2019/02/08 13:38:10 UTC

Get recent documents from solr

Hi,

I want to get latest updated documents from Solr. I am indexing data from
multiple view and each view has its own update date. Also I am running
full-indexing job every 4 hour so can't take solrtimestamp(NOW). Is there
any solr functionality by which I can achieve this.

Thanks
Shruti 




-----
Regards
Shruti
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Get recent documents from solr

Posted by shruti suri <er...@gmail.com>.
Problem got resolved using MaxFieldValueUpdateProcessorFactory. I indexed all
update dates fields in one field and used this processor factory on that
field to get latest date among all dates 



-----
Regards
Shruti
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Get recent documents from solr

Posted by shruti suri <er...@gmail.com>.
Hi,
 
Yes we are running full indexing every 4 hours and also we are using more
than 4 views to get data and each view has its own update date.



-----
Regards
Shruti
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Get recent documents from solr

Posted by Jan Høydahl <ja...@cominvent.com>.
Add a field to schema which will insert the actual indexing date

<field name="indextime" type="pdate" default="NOW" />

Then query q=*:*&sort=indextime desc

But if you re-index everything (why?) then you need to map some date stamp from the source DB into the same field in Solr schema, that you can then sort on. You're indexing from 4 DB views into the same collection in Solr, yes?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 8. feb. 2019 kl. 14:38 skrev shruti suri <er...@gmail.com>:
> 
> Hi,
> 
> I want to get latest updated documents from Solr. I am indexing data from
> multiple view and each view has its own update date. Also I am running
> full-indexing job every 4 hour so can't take solrtimestamp(NOW). Is there
> any solr functionality by which I can achieve this.
> 
> Thanks
> Shruti 
> 
> 
> 
> 
> -----
> Regards
> Shruti
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html