Search code examples
azureazure-cognitive-search

In Azure Search Services, metadata_storage_path is wrong


I have indexed the content of a blob container in a Azure Search Service index, using indexers, via Azure Portal.

When running queries in Azure portal, most of the documents have the correct metadata_storage_path but few do not. They have an extra character after the name, usually a '5'. It seems Azure appends a "1" in the base64 representation of metadata_storage_path.

Therefore, the value of metadata_storage_path does not reflect the correct location of the file. It has an extra "5" at the end.

In case anyone wonders, the files haven't been changed, removed or anything.

Did anyone notices something similar? Is there a known solution?


Solution

  • Most probably you're not using the same base64 decoding algorithm used by the Azure Search blob indexer to encode the path. If you're using the full .NET Framework, use HttpServerUtility.UrlTokenDecode. If you're using .NET Core, see this answer.