Take this with a sizeable grain of salt as I haven't actually tried doing this. But you might try using an IndexReader which it looks like you can get from this class:
http://lucene.apache.org/solr/api/org/apache/solr/core/StandardIndexReaderFactory.html sasank On Tue, Nov 30, 2010 at 6:45 AM, Lohrenz, Steven <steven.lohr...@hmhpub.com>wrote: > Hmm, I found some similar queries on stackoverflow and they did not > recommend exposing the lucene docId. > > So, I guess my question becomes: What is the best way, from within my > custom QParser, to take a list of solr primary keys (that were retrieved > from elsewhere) and turn them into docIds? I also saw something about > cacheing them using a Field Cache - how would I do that? > > Thanks, > Steve > > -----Original Message----- > From: Lohrenz, Steven [mailto:steven.lohr...@hmhpub.com] > Sent: 30 November 2010 11:57 > To: solr-user@lucene.apache.org > Subject: Return Lucene DocId in Solr Results > > Hi, > > I was wondering how I would go about getting the lucene docid included in > the results from a solr query? > > I've built a QueryParser to query another solr instance and and join the > results of the two instances through the use of a Filter. The Filter needs > the lucene docid to work. This is the only bit I'm missing right now. > > Thanks, > Steve > >