lucene - Get Latest N Documents from Solr -


i have standard solr 3.6 index , looking latest n documents (date ascending indexing them).

this site helpful not i'm looking for.

i looking this:

localhost:8080/solr/select/?q=greekbailout&wt=json; date asc 

basically, query whatever json output , latest n submitted documents index. run before?

solr query using date field n documents returned in results

localhost:8080/solr/select/?q=greekbailout&wt=json&sort=date asc&rows=n 

default schema of solr has field called timestamp, stores time @ particular document created or modified, if date field doesn't quite store , requirement, can use timestamp.. replace date timestamp


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -