Our index looks like (this is from the query explorer) :
"value": [
{
"@search.score": 1.5390168,
"key": "xxx",
"content": null,
"fileSize": null,
"filenames": [
"File 1.docx",
"File 1.docx",
"File 1.docx",
],
"paths": [
"\\\\Server\\Share\FolderA",
"\\\\Server\\Share\FolderB",
"\\\\Server\\Share\FolderC",
]
},
This showing that File 1.doc
exists in more than once place, but we store it once in azure blob storange and thats why we have one key, the xxx
is the blob storage key.
I have been reading the docs OData Expression Syntax for Azure Search but I don't see an example that allows us to filter with a startswith or contains from the collection.
I have tried
var searchParameters = new SearchParameters()
{
Filter = @"paths/any(t: t gt '\\Server\Share')",
};
We need to be able to search for the contents of a file for a given path.
EDIT
Our CosmosDb
database has the view of the data as it's represented to the user, this database has links
to the blob, so the other option would be to index the CosmosDb
and have the indexer follow the links to the blobs, the documentation does not suggest that this is possible. Or, would we be better to write our own indexer
and host this as an azure function
.
We have one row per document and a pointer to the blob, many document rows can point to the same blob.