I have been using numeric ids through out my app so obviously that wont be changed in my app. But I dont mind if Solr uses them as stringified.
On Sun, Oct 6, 2013 at 11:48 PM, Jack Krupansky <j...@basetechnology.com> wrote: > It all depends. Sorry I don't have a feature list, but there are places in > Solr that assume that the unique key field is a string, or at least > convertible to a string. So, as long as you don't use any of those features > of that unspecified list, you will be okay. > > Is there any reason you require it to be an integer? I mean, isn't a > numeric string good enough for your app? > > > -- Jack Krupansky > > -----Original Message----- From: Ertio Lew > Sent: Sunday, October 06, 2013 1:36 PM > To: solr-user@lucene.apache.org > Subject: Re: Can I use app specific document id as the document id that > Solr uses for internal purposes? > > > @Jack Krupansky : > >> you can put whatever application value (hopefully a string) you want into >> > your unique key field. > > Is there any issue if I use an integer field type for id ? > > > On Sun, Oct 6, 2013 at 9:06 PM, Jack Krupansky <j...@basetechnology.com>** > wrote: > > 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. >> >> > On Sun, Oct 6, 2013 at 11:48 PM, Jack Krupansky <j...@basetechnology.com>wrote: > It all depends. Sorry I don't have a feature list, but there are places in > Solr that assume that the unique key field is a string, or at least > convertible to a string. So, as long as you don't use any of those features > of that unspecified list, you will be okay. > > Is there any reason you require it to be an integer? I mean, isn't a > numeric string good enough for your app? > > > -- Jack Krupansky > > -----Original Message----- From: Ertio Lew > Sent: Sunday, October 06, 2013 1:36 PM > To: solr-user@lucene.apache.org > Subject: Re: Can I use app specific document id as the document id that > Solr uses for internal purposes? > > > @Jack Krupansky : > >> you can put whatever application value (hopefully a string) you want into >> > your unique key field. > > Is there any issue if I use an integer field type for id ? > > > On Sun, Oct 6, 2013 at 9:06 PM, Jack Krupansky <j...@basetechnology.com>** > wrote: > > 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. >> >> >