This could be a very useful feature. To do it properly, you'd want some new update syntax, extending that of the atomic updates. That is, a new custom request handler could do it, but might now be the best way.
If I were to try this, I'd look into the atomic update tickets in JIRA and see what code they touched. See if you can find a way to add something there. Upayavira On Wed, Jun 19, 2013, at 08:52 AM, Avner Levy wrote: > I have a core with millions of records. > I want to add a custom handler which scan the existing documents and > update one of the field (delete and add document) based on a condition > (age>12 for example). > All fields are stored so there is no problem to recreate the document > from the search result. > I prefer doing it on the Solr server side for avoiding sending millions > of documents to the client and back. > I'm thinking of writing a solr plugin which will receive a query and > update some fields on the query documents (like the delete by query > handler). > Are existing solutions or better alternatives? > I couldn't find any examples of Solr plugins which update / add / delete > documents (I don't need to extend the update handler). > If someone has an example it will be great help. > Thanks in advance