Re: Atomic updates on multiple documents

2015-09-18 Thread Alfonso Muñoz-Pomer Fuentes
Thank you everyone for the useful comments and observations. I’ll start using atomic updates in the way they’re intended to and, if I don’t get the performance we need, I’ll try with a custom RequestUpdateProcessor. On 17/09/2015 20:08, Alexandre Rafalovitch wrote: You could probably do

Atomic updates on multiple documents

2015-09-17 Thread Alfonso Muñoz-Pomer Fuentes
Hi, I have a question regarding atomic updates on multiple documents. We’re using Solr 5.1.0, and I’m wondering if it’s possible to perform an atomic update on multiple documents with one request. After having a look at http://yonik.com/solr/atomic-updates/ I tried to do the following after

Re: Atomic updates on multiple documents

2015-09-17 Thread Shawn Heisey
On 9/17/2015 9:48 AM, Alfonso Muñoz-Pomer Fuentes wrote: > Hi, I have a question regarding atomic updates on multiple documents. > > We’re using Solr 5.1.0, and I’m wondering if it’s possible to perform > an atomic update on multiple documents with one request. > > After hav

Re: Atomic updates on multiple documents

2015-09-17 Thread Shawn Heisey
On 9/17/2015 10:14 AM, Shawn Heisey wrote: > This assumes that the uniqueKey field is "id". Unless your uniqueKey > field is "author_s" (which is highly unlikely), the JSON that you used > will not work. Chances are that the request failed, that nothing happened. On my first reading, I did not

Re: Atomic updates on multiple documents

2015-09-17 Thread Alessandro Benedetti
You need to do that programmatically. Using SolrJ would be not so difficult to do that in few line of codes. Be careful to the stored fields if you don't want to lose anything. Cheers 2015-09-17 17:48 GMT+01:00 Alfonso Muñoz-Pomer Fuentes : > You’re right, we’re not working

Re: Atomic updates on multiple documents

2015-09-17 Thread Alfonso Muñoz-Pomer Fuentes
We’re using SolrJ as well, but if I understood correctly I would need to have the uniqueKey values anyway, right? There’s no way to do what I want with one request. A simple outline is: 1. Get the uniqueKey values that match my query 2. Create a set of SolrInputDocument 3. Add the id and the

Re: Atomic updates on multiple documents

2015-09-17 Thread Alessandro Benedetti
Hi Highlight Shawn answer : " Solr does not have anything like the SQL syntax that lets you update all rows that match a WHERE clause." In particular when adding a document to Solr, you are actually adding a new Document to the index ( under the hood) . The atomic update is only a user friendly

Re: Atomic updates on multiple documents

2015-09-17 Thread Alexandre Rafalovitch
You could probably do this as a RequestUpdateProcessor (a custom one) that would take your submitted document, run a query and expand it to a bunch of documents. So, do the ID mapping internally. But you would need the ID/uniqueKeys. Definitely nothing out of the box, that I can think of.

Re: Atomic updates on multiple documents

2015-09-17 Thread Alfonso Muñoz-Pomer Fuentes
You’re right, we’re not working with a uniqueKey and I wasn’t aware of that requirement. What I’d like is to update the documents without having to retrieve all of them (or their unique ids). Basically, there are some data that all documents that match a query will share; for the sake of the