I don't think we should allow deleting the uniqueKey field. I'm surprised it even works - I would have thought that there would be a schema validity check: you shouldn't be able to specify a non-existent field as the uniqueKey. Note that the replace-field operation should be fine in this case.
Schemaless makes the situation less clear-cut, since as you say the field will be auto-created on first doc update containing the field, but even then the schema will be effectively invalid in the interim. On Wed, Nov 25, 2015 at 12:09 PM, Alexandre Rafalovitch <[email protected]> wrote: > I am testing 5.4 branch and was enjoying new UI for adding/removing > fields in the schema. > > So, for a test of an error message, I decided to delete the ID field. > And it let me. And then I indexed some files and the ID got recreated > as a generic field. > > Should this be allowed or should delete field API check that we are > not deleting the uniqueKey? I can kind of see it both ways. > > Regards, > Alex. > ---- > Newsletter and resources for Solr beginners and intermediates: > http://www.solr-start.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
