Before you begin
- Set up Neural Hybrid Search.
- Use Lucidworks Search 5.9.14 or later.
- Set up the Lucidworks AI Gateway integration.
- Make sure each document has a publicly reachable image URL or the image as base64-encoded data.
Set up image search
1
Add a vector field type for 1152 dimensions
The model returns 1152-dimensional vectors, a size the default schema doesn’t include.
Go to System > Solr Config, open managed-schema, and add this field type and dynamic field:
2
Vectorize images when indexing
In the index pipeline, add an LWAI Vectorize Field or LWAI Batch Vectorize stage.
Configure the stage with the following settings:
- Model:
siglip2-so400m-patch14-384. - Source: the field that holds each document’s image URL, such as
image_url_s. - Destination: a field that ends in
_1152v, such asimage_1152v. - Model Configuration: a parameter named
imageDatawith the valueURL. If the source field holds base64-encoded images instead of URLs, use the valuebase64.
3
Vectorize query images
In the query pipeline, add an LWAI Vectorize Query stage.
Configure the stage with the following settings:
- Model:
siglip2-so400m-patch14-384. - Query Input:
<request.params.q>. - Output Context Variable:
vector. - Model Configuration: a parameter named
imageDatawith the valueURLif queries send image URLs, orbase64if they send base64-encoded images.
4
Search the image vectors
After the LWAI Vectorize Query stage and before the Solr Query stage, add an Additional Query Parameters stage.
Add the following parameters, each with the policy
replace:Replace
image_1152v with the destination field from the index stage, and set topK to the number of nearest images to return.Set the stage’s Condition so it runs only when the query contains an image:Limitations
- Products that look alike, or that share the same stock image, can’t be told apart by their images.