Click or drag to resize
NamingHelperGetValidDocumentKey Method
Gets document key which is valid to be used for Azure Search document.

Namespace: CMS.Search.Azure
Assembly: CMS.Search.Azure (in CMS.Search.Azure.dll) Version: 12.0.0
Syntax
C#
public static string GetValidDocumentKey(
	string documentKey
)

Parameters

documentKey
Type: SystemString
Document key to be renamed so it fulfills Azure Search naming conventions.

Return Value

Type: String
Returns document key where semicolons are replaced by dashes.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when documentKey is null.
Remarks

Azure Search has naming rules (https://docs.microsoft.com/en-us/rest/api/searchservice/naming-rules) which document keys must follow.

Since the system uses semicolon (';') as a delimiter for compound identifiers, the default implementation replaces all semicolons by dashes ('-').

See Also