Update images

Solr should not be used as a data warehouse, but as a searchengine only because the options regarding update operations in Solr are quite limited. Updating images means in general replacing existing Solr documents.

Please read the Solr update documentation for further details.

Assuming the following document exists in your collection:

{
  "id":"1",
  "keywords":["one","two"],
  "path":"http://localhost/image.jpg",
  "pxl_imagedescriptor":"gCCB5vbIKTQd0dwINBkGDOUyAB7/CScf+PMH/fwfHPzv4vIWFwUJFg70AO39CP3qCAcEAvD8/ P0A8gbqBPj8BYAA2v2i37aHg6KUzZSTjYKBprOogBDuBw0B6PMo4wIa6fr3+vaVo9XE85Owmp3JlpyujJuwioAxAECAQBAmaTIGRQJQAER3WVxjDHM="
}

If you want to change the indexed image descriptor (maybe your source image changed), put the following JSON into a file named replace.json in the current working directory:

{
  "id":"1",
  "keywords":["one","two"],
  "path":"http://localhost/new-image.jpg",
  "pxl_imagedescriptor":"http://localhost/new-image.jpg"
}

You can then send this JSON payload to the /update request handler of a Solr collection reachable at localhost/solr/collection with this curl command:

curl "http://localhost/solr/collection/update/json?commit=true" -d @replace.json

pixolution flow analyzes the given image and replaces the already indexed image descriptor with the new one.

If the update payload is missing a field, the field will be deleted from the index. This means an update payload must contain the whole new document.