After migration from Solr
to Azure Search
I found the problem with a limited amount of fields for Sitecore indexes: core and master
.
In all articles\answers was suggested disabling of indexAllFields
property.
But after this change rebuild stopped working.
Error is:
Message: {"error":{"code":"InvalidRequestParameter","message":"The request is invalid.","details":[{"code":"InvalidScoringProfile","message":"The field named 'boost_2' referenced in the scoring function was not found in the index schema. Parameters: definition"}]}}
I found usage of this field in the Sitecore.ContentSearch.Azure.DefaultIndexConfiguration
:
<scoringProfilesRepository type="Sitecore.ContentSearch.Azure.Models.ScoringProfilesRepository, Sitecore.ContentSearch.Azure">
<activeScoringProfileName>itemboost</activeScoringProfileName>
<scoringProfiles hint="raw:AddScoringProfile">
<scoringProfile functionType="magnitude" interpolationType="linear" boostingRangeStart="1" boostingRangeEnd="10" cloudFieldName="boost_2" scoringProfileName="itemboost" scoringProfileBoostValue="10" constantBoostBeyondRange="false" />
</scoringProfiles>
</scoringProfilesRepository>
So how could I make it work with reduced amount of indexed fields in sitecore indexes?