Because it 99% of the use cases want to update solr index with changes. Which requires some way of duplicate management.
But Solr does support a one-shot 'don't care' method as well, just as the previous reply showed. Try that and let us know if you are still stuck. Regards, Alex On Wed., Oct. 6, 2021, 6:37 a.m. KARTHIK SHIVAKUMAR, <nskarthi...@gmail.com> wrote: > Hi > > Why Solr is not considering this field a internal to it's objective and > allowing to be declared... > > Solr should handle this Id with out exposing , so the same is not > reflected by users to raise this case again and again.... > > If an user can directly index / search with out this field (forced to add > )... since if solr can handle this internally for each doc created/ deleted. > > with regards > karthik > > On 2021/10/01 20:09:59, Shawn Heisey <apa...@elyograg.org> wrote: > > On 10/1/21 10:51 AM, KARTHIK SHIVAKUMAR wrote: > > > Problem : Error from server at http://localhost:8081/solr/Log-Test: > Document is missing mandatory uniqueKey field: id. > > > > > > Process : I have written a small Solr-Client code to push content to > solr-indexer on port 8081 > > > > > > Question : I have encountered this problem for the first time and did > not find any proper solutions on www for the same. > > > > > > Request : How to fix this With-Out introducing 'id' as another > parameter passed on from content side ??. > > > > The entire point of uniqueKey is that every document will have something > > in that field, and that if an existing document has the same value in > > that field as a document that is being indexed, it is deleted and the > > new document takes its place. By design, if you have a uniqueKey field, > > every submitted document must have a value in that field. A uniqueKey > > is required for several Solr features, including distributed indexes > > (those with more than one shard). > > > > There is an existing update processor that can fill in a field with a > > random UUID if the field doesn't exist in the submitted document. But > > note that if you do use this, you will no longer be able to have Solr > > automatically replace that old document with a new one without some > > extra work, because nothing outside of Solr will have any knowledge > > about what the uniqueKey field contains for that document. > > > > I hope that gives you a direction. > > > > Thanks, > > Shawn > > > > >