Re: Return Lucene DocId in Solr Results

2010-12-08 Thread Chris Hostetter
: Subject: Re: Return Lucene DocId in Solr Results : : Ahhh, you're already down in Lucene. That makes things easier... : : See TermDocs. Particularly seek(Term). That'll directly access the indexed : unique key rather than having to form a bunch of queries. you should also sort

Re: Return Lucene DocId in Solr Results

2010-12-02 Thread Erick Erickson
} >//ScoreDoc[] hits = collector.topDocs().scoreDocs; >//if(hits != null && hits[0] != null) { > > i++; > //} > } > >Arrays.sort(docIds); >return docIds; >} > > Thanks, > Steve > ---

RE: Return Lucene DocId in Solr Results

2010-12-02 Thread Lohrenz, Steven
//} } Arrays.sort(docIds); return docIds; } Thanks, Steve -Original Message- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: 02 December 2010 14:20 To: solr-user@lucene.apache.org Subject: Re: Return Lucene DocId in Solr Results

Re: Return Lucene DocId in Solr Results

2010-12-02 Thread Erick Erickson
;} > >ScoreDoc[] hits = collector.topDocs().scoreDocs; >if(hits != null && hits[0] != null) { >docIds[i] = hits[0].doc; >i++; >} >} > > Arrays.sort(docIds); > return docIds; > } > > -Original M

RE: Return Lucene DocId in Solr Results

2010-12-02 Thread Lohrenz, Steven
oc; i++; } } Arrays.sort(docIds); return docIds; } -Original Message- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: 02 December 2010 13:46 To: solr-user@lucene.apache.org Subject: Re: Return Lucene DocId in Sol

Re: Return Lucene DocId in Solr Results

2010-12-02 Thread Erick Erickson
> Thanks, > Steve > > -Original Message- > From: Erick Erickson [mailto:erickerick...@gmail.com] > Sent: 02 December 2010 02:19 > To: solr-user@lucene.apache.org > Subject: Re: Return Lucene DocId in Solr Results > > On the face of it, this doesn't mak

RE: Return Lucene DocId in Solr Results

2010-12-02 Thread Lohrenz, Steven
: Return Lucene DocId in Solr Results On the face of it, this doesn't make sense, so perhaps you can explain a bit.The doc IDs from one Solr instance have no relation to the doc IDs from another Solr instance. So anything that uses doc IDs from one Solr instance to create a filter on another ins

Re: Return Lucene DocId in Solr Results

2010-12-01 Thread Erick Erickson
On the face of it, this doesn't make sense, so perhaps you can explain a bit.The doc IDs from one Solr instance have no relation to the doc IDs from another Solr instance. So anything that uses doc IDs from one Solr instance to create a filter on another instance doesn't seem to be something you'd

Re: Return Lucene DocId in Solr Results

2010-12-01 Thread Sasank Mudunuri
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, L

RE: Return Lucene DocId in Solr Results

2010-11-30 Thread Lohrenz, Steven
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 a