photos_ingest

The whole indexing of a photo, on Opensolr's side.

The whole indexing of a photo happens here, on Opensolr's side. The phone sends a small copy of each new or changed photo with the facts only it knows, and Opensolr does the rest and writes the document into your index.

01 · The call
POST https://api.opensolr.com/solr_manager/api/photos_ingest

A JSON body with email, api_key, index_name, top_k and photos. The app sends five photos per call; Opensolr accepts up to ten.

Each photo carries:

  • its id, path, folder, file name, media id, type, size, dimensions and modification time;
  • file_hash, the md5 of the original file, and pixel_hash, a fingerprint of the picture itself;
  • image: an upright 1024 px JPEG copy, re-encoded from the pixels, carrying only the time, camera, exposure and position of the original;
  • faces: the faces the phone found and named;
  • when this phone holds them: your tags, your meaning and the persons on the photo, with flags saying which of them are yours.
02 · What Opensolr does
  1. Checks every picture by its bytes: an image format, at most 20 MB, at most 1024 px on its long edge.
  2. Reads the EXIF of the whole batch. A photo with no date of its own keeps the date the index already holds.
  3. Turns the GPS position, rounded to about ten metres, into place names and a street address.
  4. On a plan with vector search and allowance left: reads what each photo shows and the text printed in it, at the same time. A picture read before is answered from Opensolr's cache.
  5. Puts your tags and wording on top. For a photo the phone did not speak for, it keeps those already in the index. What was read out of the same file before is kept when this pass reads nothing.
  6. Makes the search vector, one call for the batch, from the people, what the photo shows, the place and your tags.
  7. Writes the keys for similar photos, builds the complete documents and writes them with one request, searchable about ten seconds later.
03 · The answer
{"status": true, "charged": 1, "results": [{"id": "…", "status": true, "words": true, "place": true, …the document…}, …]}
  • One result per photo, in order: whether it was read into words, whether it got a place, and the document as written, without the vector and the similar-photo keys. That is what the phone stores in its copy.
  • charged: the AI requests actually counted. A tenth of a request per photo a model really worked on, never more than one tenth per photo whether it was the words, the printed text or the vector; a picture answered from cache costs nothing.

On a plan without vector search, or with this month's AI requests used up, nothing is read and nothing is charged: the photo is written with its date, camera, place, file name and your words, and words is false. See without photo recognition.

Every call it makes

Opensolr Photos is open source and MIT licensed. Questions about your Opensolr account, index or plan go to opensolr.com/contact; questions about the app itself belong on GitHub.

Opensolr Photos Documentation