1

I have a regular date field defined like this:

<field type="System.DateTime" fieldName="entry_date" cloudFieldName="entry_date" searchable="NO" retrievable="YES" facetable="YES" filterable="YES" sortable="YES" boost="1f" format="yyyy-MM-ddTHH:mm:ss.fffZ" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure"/>

For some reason when I try to inspect the index using Azure Search explorer the field does not show up in the results although the other fields do bring results properly. After rebuilding the index I would expect to see the custom field showing in my query but it doesn't show up.

thoughts on what could be wrong?

1 Answer 1

4

Make sure your fieldName is matching the field name in Sitecore. So if it's Entry Date in Sitecore then make it entry date in the index, however you'll need to set the cloudFieldName to entry_date or entrydate for it to be compatible with azure search conventions.

<fieldNames hint="raw:AddFieldByFieldName">
    <field type="System.DateTime" fieldName="entry date" cloudFieldName="entry_date" searchable="NO" retrievable="YES" facetable="YES" filterable="YES" sortable="YES" boost="1f" format="yyyy-MM-ddTHH:mm:ss.fffZ" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure"/>
</fieldNames>

Please see the App_Config\Sitecore\ContentSearch.Azure\Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config for where these configs should go and more examples. Also note you shouldn't modify stock configs, patch your changes instead.

Note that cloudFieldNames need to be unique for the whole index.

If your change is still not showing in Azure Search after rebuilding the index then try delete the index manually in Azure Search and then rebuild it again.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.