A source path and a search key solve different problems
A conservation archive stores scanned notes in Azure Blob Storage. Their paths include spaces, punctuation, slashes, and accession identifiers with leading zeros. The search index needs a stable document key that can be addressed through the Lookup API, but editors also need the original blob path to open the correct source file. Substituting a cleaned display name for both values risks collisions.
Azure AI Search supports a base64Encode mapping function for converting appropriate source strings into URL-safe index keys. The operation changes representation; it is not encryption or anonymization. The publication system should retain the original path in a separately governed field and verify that both values refer to the intended archival object.
Understand when field mappings are required
Indexers can infer mappings when source and target names and types align, but explicit fieldMappings control renamed fields or transformations. Microsoft documents base64Encode among the supported mapping functions. The function operates on a UTF-8 string and produces an encoding suitable for keys when the correct URL-safe option is used.
Do not apply it blindly to every descriptive field. Names meant for human search should normally remain readable in a separate source or display field. Mapping functions work on supported parent-index mappings and are not generally interchangeable with chunked index projections. Verify your index topology before copying an example.

Map one source path to two distinct destinations
The official guide demonstrates mapping metadata_storage_path to an encoded key field and also preserving metadata_storage_path as a plain source field. This dual mapping avoids discarding the path necessary for source retrieval while satisfying search key rules. Name the fields so downstream code cannot accidentally display the encoded value as a visitor-facing accession number.
A museum should also store an independently validated accession ID and object version if the workflow requires those concepts. The blob path can change when material is moved; neither encoded nor plain path alone proves an object’s provenance. Reconcile source manifests and planned renames before indexing.
Select the URL-safe encoding parameters carefully
Microsoft documents useHttpServerUtilityUrlTokenEncode and explains that when a Base64 encoded value is used as a search key it must be URL-safe. The service supports more than one encoding convention, so encoding and decoding settings must match. Avoid reconstructing a key with an ordinary Base64 routine that may add unsuitable characters or padding.
If interoperability with another programming language matters, test representative paths using the documented encoding rules. Include slashes, Unicode names, trailing spaces where valid, and leading-zero accession folders. Do not assume the resulting encoded string is identical across different encoders unless they use the same rules.
Check document-key length and uniqueness
Microsoft documents a maximum key length of 1,024 characters for search document keys. Encoding can expand an already long path, so an archive with deeply nested folders must test length before ingestion. A valid encoded string can still be the wrong key if the input path was truncated or normalized inconsistently upstream.
Inspect collisions, canonicalization rules, and object version behavior. If a path changes but the original object must remain identifiable, use a stable catalog identifier and a governed mapping table. Never equate successful encoding with uniqueness or with a legally significant accession number.

Compare the three representation states
The first conceptual state uses a raw storage path in a field that may reject unsupported key characters. The second encodes the path into a URL-safe search identifier. The third retains both the addressable key and original source path so a reviewer can navigate back to the approved blob. None of these illustrations come from a live Azure indexer.
The correct design should be reversible where that is required for source lookup, but reversibility does not grant access to private objects. An application must still enforce storage permissions and the museum’s rights policy. Encoding is a schema compatibility tool, not a privacy boundary.
Keep the source of truth visible to curators
A human review screen should display the original path, catalog ID, source revision, and an accessible preview where permitted. It may retain the encoded key as technical metadata for exact document lookup. If a search hit omits the source path or points to a moved file, flag the result unresolved rather than constructing a guessed path from the title.
Maintain a manifest of expected index records and their source identities. For each indexing batch, compare the number of approved blobs with indexed keys and check samples involving unusual characters. A green indexer status can coexist with an incorrect mapping if input fields were populated differently than expected.
Plan for storage moves and updates
Changing a blob path may change the encoded key. Consider how indexer change detection, source deletion handling, and downstream citations respond to the move. An old key may remain in caches, exported reports, or static pages; coordinate cleanup with the approved catalog system before redirecting visitors to a new record.
Test an updated caption, a renamed blob, and a deliberately revoked source in a nonproduction index. Confirm that no stale public result retains restricted material. Keep the original path field under the appropriate permissions even if the encoded key is shown in an internal diagnostic.
Treat error handling as an audit obligation
A failed field mapping or an overlength key should create a named exception linked to the source record. Do not silently skip a conservation note and then report complete archive coverage. Inspect indexer execution logs and reconcile successful writes with the manifest, including files that contain non-ASCII names or special punctuation.
Avoid embedding secrets in blob paths merely because Base64 makes them less readable. Any reader of the encoded key can decode it. Use source naming policies, encryption and access controls for confidentiality, and clear, non-sensitive record identifiers where public links are needed.

Approve search publication through the original records
Before releasing results, verify that each key resolves to the expected authorized blob, its descriptive fields match the approved catalog, and the source file is licensed or otherwise permitted for visitor use. A technical encoding fix should never bypass content or rights review. Keep a named registrar or curator responsible for the final sign-off.
This guide describes documented field mapping behavior and a hypothetical collection. No indexer was run, no object was retrieved, and no coverage measurement is claimed. Recheck API version, mapping support, and index key rules before adopting the approach in production.
How We Research
We examined primary vendor documentation on November 11, 2026: Azure AI Search field mappings guide; Azure AI Search blob indexer guide; Azure AI Search indexers create reference. The feature boundaries described above come from these references; the museum and archive scenarios are deliberately hypothetical. We compared the documented fields against likely failure modes, including source omission, access restrictions, and incomplete downstream work. Each illustration depicts an explanatory example rather than a real product screen, observed experiment, performance metric, or customer data. We did not issue live requests to the services, inspect private content, test prices, or certify security. Verify current API behavior, organization permissions, storage terms, billing, and source rights before making production changes.
Frequently Asked Questions
No. It produces reversible encoding; permissions and source governance must provide confidentiality.
Azure AI Search keys must use allowed characters; URL-safe encoding can make a path addressable through the Lookup API.
No. Map it into a separate plain field when editors need to retrieve the original source.
Microsoft documents mapping functions for parent indexes; check the limits before using them with chunked projections.
The field mapping guide documents a 1,024-character maximum for a search document key.
