Get recent documents from solr

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Get recent documents from solr

shruti suri
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
Regards
Shruti
Reply | Threaded
Open this post in threaded view
|

Re: Get recent documents from solr

Jan Høydahl / Cominvent
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 <[hidden email]>:
>
> 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

Reply | Threaded
Open this post in threaded view
|

Re: Get recent documents from solr

shruti suri
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
Regards
Shruti
Reply | Threaded
Open this post in threaded view
|

Re: Get recent documents from solr

shruti suri
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
Regards
Shruti