0
votes

I have a storage account containing blobs named to produce a virtual hierarchy:

Data/2016/image01.jpg
   w=640
   h=480
Data/2017/image02.jpg
   w=320
   h=240
...

All blobs hold metadata fields containing image width(w) and height(h)

I've implemented a Search service and added the blob metadata as searchable fields.

This works fine to search over all blobs and filter by w or h:

search=*&$filter=(w eq 640)

I'm also confused with blob names. AFAIK after Containers, all blobs are stored flat and the virtual hierarchy (as seen in the Azure portal when browsing blobs) is just derived from adding '/' in the blob name. However when you fetch the metadata_storage_name it only returns the last segment of the name not the full path.

How can I further filter by blob name? For example only return blobs that contain '2017' in their name and w==640

Edit: I partially solved my problem. Turns out I was adding $queryType=full not queryType=full to my search. So something like this will work: queryType=full&search=image02*&$filter=(w eq 640) but still no way to include the blob "path" in the search.

1

1 Answers

0
votes

There is also metadata_storage_path field which contains full path. Unfortunately it contains also entire blob storage URL.

metadata_storage_path (Edm.String) - the full URI of the blob, including the storage account. For example, https://myaccount.blob.core.windows.net/my-container/my-folder/subfolder/resume.pdf