lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Can I use app specific document id as the document id that Solr uses for internal purposes?
Date Sun, 06 Oct 2013 15:36:14 GMT
Deep under the hood: Lucene is assigning a "Lucene document ID" when Solr 
adds a document. In fact, Lucene will assign a new Lucene document ID if you 
ask Solr to update or replace a document. That said, Solr generally uses the 
value from your unique key field as its "internal" ID, and you can put 
whatever application value (hopefully a string) you want into your unique 
key field.

Generally, you should not be using the Lucene document ID. Stick to using 
your unique key field values.

But if I understand your question properly, yes, you can index your "app 
docId" in your Solr unique key field.

-- Jack Krupansky

-----Original Message----- 
From: Ertio Lew
Sent: Sunday, October 06, 2013 4:46 AM
To: solr-user@lucene.apache.org
Subject: Can I use app specific document id as the document id that Solr 
uses for internal purposes?

Could I just use my application specific document id as the document id
that solr uses for internal purposes, ie. indexing etc because I don't
store any other field other than id of the document(rest document data is
stored in DB).  In my schema the only thing that I store is the document
id, this is the only thing I want back from solr as results.

If I could do this I can prevent a few unnecessary lookups (while Solr
passes me back the query results) for mapping: solr docid-> my app docId. 


Mime
View raw message