opensolr_search_by_image
Search an Opensolr index with an image by extracting visual labels, OCR text, or barcode/QR code as the query, returning the extracted data and matching documents.
Instructions
Search an Opensolr index with a PHOTO instead of a text query.
The image at image_path is read three ways by the Opensolr image engine —
visual labels (what it depicts), OCR text (words printed on it), and any
barcode / QR code — and turned into a text query that runs through the normal
search. No image vector is stored; the picture simply becomes words.
using selects which reading drives the search:
"auto" the engine's chosen text (OCR text when the picture is mostly text,
otherwise the visual labels) — the default,
"meaning" the visual labels (what the picture depicts),
"text" only the OCR text read off the picture (empty if none),
"code" the first barcode / QR code, matched as an exact keyword.
search_mode / mode / alpha / fresh_bias / filter_query behave exactly as in
opensolr_search. Returns {"read": {text, mode, labels, codes}, "results": [...]}
so the caller sees both what the picture was read as and the matching documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| mode | No | union | |
| alpha | No | ||
| index | Yes | ||
| using | No | auto | |
| fresh_bias | No | ||
| image_path | Yes | ||
| search_mode | No | hybrid | |
| filter_query | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |