4

I am getting the following when trying to build my index:

The request is invalid. Details: definition : Invalid field name: 'end date'. Field names must begin with a letter and can contain only letters, digits, or underscore

I don't want to rename my field in Sitecore to not have spaces, so I need to somehow create a mapping so Azure Search accepts the field name.

1 Answer 1

4

This is solved by specifying a cloudFieldName attribute to the <field> element:

 <field fieldName="end date" cloudFieldName="end_date" storageType="YES" indexType="UN_TOKENIZED" vectorType="NO" boost="1f" type="System.DateTime" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure" /> 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.