[ https://issues.apache.org/jira/browse/SOLR-15827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex updated SOLR-15827: ------------------------ Description: At the moment it is possible to update a document, or list of documents only by ID. It will be very useful to support also update by some query different from ID. In our case we have a shop where users can sell some products, so we store the product details with seller details in same document. And when we need to change the seller name, we need first to select all the products in order to have the IDs, and then update all the documents by IDs. All this can be handled internally by Solr by supporting update by query. The endpoint can look like {code:java} POST http://localhost:8983/solr/techproducts/update?query=seller_id:12345 --data-binary '{ "seller_name": {"set":"John Doe"}}' {code} {{end this request will update all the documents where seller_id=12345.}} was: At the moment it is possible to update a document, or list of documents only by ID. It will be very useful to support also update by some query different from ID. In our case we have a shop where users can sell some products, so we store the product details along with seller details in same document. And when we need to change the seller name, we need first to select all the products in order to have the IDs, and then update all the documents by IDs. All this can be handled internally by Solr by supporting update by query. The endpoint can look like {code:java} POST http://localhost:8983/solr/techproducts/update?query=seller_id:12345 --data-binary '{ "seller_name": {"set":"John Doe"}}' {code} {{end this request will update all the documents where seller_id=12345.}} > Update documents by query > ------------------------- > > Key: SOLR-15827 > URL: https://issues.apache.org/jira/browse/SOLR-15827 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: update > Reporter: Alex > Priority: Major > Labels: update > > At the moment it is possible to update a document, or list of documents only > by ID. > It will be very useful to support also update by some query different from ID. > In our case we have a shop where users can sell some products, so we store > the product details with seller details in same document. > And when we need to change the seller name, we need first to select all the > products in order to have the IDs, and then update all the documents by IDs. > All this can be handled internally by Solr by supporting update by query. > The endpoint can look like > {code:java} > POST http://localhost:8983/solr/techproducts/update?query=seller_id:12345 > --data-binary '{ "seller_name": {"set":"John Doe"}}' > {code} > {{end this request will update all the documents where seller_id=12345.}} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org