I need to update large amount of documents in solr very often. For example, set “online” = true for user_id = 5 and so on. But speed of indexation via http handler is very slow. Solr support delete documents by query, is there way to update by query?
Share
No, unfortunately there isn’t any feature like update by query. It would be really useful, like a new feature to make possible updating a document without the need to resubmit it entirely; there’s a 5 years old jira issue for that. For now you should just re-submit your documents with the updated fields, they will be overwritten (it means deleted + re-inserted) if you use the same
uniqueKey.By the way, are you making an http request for each document to update? If yes, you can make it faster submitting more than one document at a time like this: