Click or drag to resize
NamingHelperGetValidFieldNameInternal Method
Gets field name which is valid to be used for Azure Search index.

Namespace: CMS.Search.Azure
Assembly: CMS.Search.Azure (in CMS.Search.Azure.dll) Version: 12.0.0
Syntax
C#
protected virtual string GetValidFieldNameInternal(
	string fieldName
)

Parameters

fieldName
Type: SystemString
Field name to be renamed so it fulfills Azure Search naming conventions.

Return Value

Type: String
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when fieldName is null.
Remarks

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

  • Allowed characters are letters, numbers and dashes ('_').
  • First character must be a letter.

Since system fields start with a dash (e.g. ID), the default implementation prefixes dash starting name of column by string "sys".

See Also