You can use a Solr transformer to get the Lucene docID in the fl parameter:

  &fl=id,[docid],score,my-field,...

But... you can't use the Lucene docId in a query.

Relevancy and sorting, not to mention updating of existing documents, can change the order of results so that docId is not a good indicator of document "order".

But, rather than focus prematurely on a solution, what exactly is the problem you are trying to solve? What exactly is duplicated?

-- Jack Krupansky

-----Original Message----- From: vrparekh
Sent: Thursday, June 13, 2013 11:24 AM
To: solr-user@lucene.apache.org
Subject: Solr - Get DocID of search result

Hello All,

How can I get docID of result from solr?

What I am doing currently is,

I do search request in solr.

I get certain records (Say 10).

   solrurl/start=0&rows=10

Now, again I do search request with below

   solrurl/start=10&rows=10

So i get next 10 records.

Now new records are inserted in solr (Say 10 records).
and Now If I do request again by
   solrurl/start=20&rows=10

So I might get repeated records.

So if I have docID of than I can query by less than that docID.

So is it possible to get docID?



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Get-DocID-of-search-result-tp4070253.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to