Affects Version/s: 4.10.3
Fix Version/s: None
Component/s: Schema and Analysis
We are testing the new ManagedResource for managing our Synonym filter and although it works pretty well we find it quite difficult to manage the list using the API. Specially there is no difference in using POST and PUT verbs and IMHO they should behave slightly different. Let me explain.
We start with an empty synonyms list, and we push the first synonym
Everyting works ok! Now I realise I made a mistake and one of the synonyms is incorrect. My instinct says that if i PUT the correct list again it will be overwritten.
But here nothing happens, the list stays the same wit the "error" synonym still in it. I have to DELETE thelist for the "mad" key and PUT it again.
My proposal is that a PUT command should replace the list entirely, no matter what was in the list (which in turn should be more performant, as it would not need to iterate the whole list looking for additions to be made). A POST command should work like it is working now, where only the additions are processed.
That would also enable to submit a whole list using PUT. Right now if you want to replace all the synonyms you have to delete them one by one and then POST/PUT the entire list. With this modification you would PUT the whole list and it would be replaced.
I am not quite familiar with the Solr java code but I guess I should be able to submit a patch If the issue is considered.