I have a blob container in a storage account where each blob is an image. I've added "w" and "h" metadata fields to each blob containing the width and height of the image.
I've followed the instructions here to add a search service to the blob store except I added the metadata and not the blob content.
I can confirm the metadata is there and valid, if I browse the blobs in the Azure portal I can see the fields with valid data and if I execute "search=*" in the search explorer I get this back for each blob:
{
"@search.score": 1,
"w": 640,
"h": 424,
"metadata_storage_path": "......"
}
My problem is I want to search by image width(w) and height(h) and can't workout how.
Tried these example queries to search for w=640 with no luck, just returns all blobs or errors:
w=640
search=*&w=640
search=*&w eq 640
w eq 640
One thing I've noticed is that when writing the blob metadata (I used the Azure storage Python library) you can only write string data. But when you specifiy the fields in the data source can set them as int32.
How do I enable filterable searching over blob metadata fields?
Edit: As per SumanthMarigowda-MSFT's answer, I looked a this doc, and in my case here are some example queries:
Only 640x480:
search=*&$filter=(w eq 640 and h eq 480)
All with w betwen 640 and 700:
search=*&$filter=(w ge 640 and w lt 700)
There is a similar query discussion on the MSDN forum, you may refer to the suggestion mentioned in this link.