1

I am having issue with the Azure Search where I am not getting results from the search index (it is random issue).

I’ve verified the configurations of Azure search and computed index fields. Below is the Azure Search query from the Sitecore logs:

((contentbody_s:(/.*philosopher.*/)))&queryType=full&$skip=0&$top=10&$count=true

I tried to verify above query in the Azure search explorer but getting no results. Then I’ve tried by removing the queryType=full and I am getting the results.

Also the same query is working for other keywords like Hope, Happiness.

Can any one suggest what might be the issue?

Thanks in advance!

  • Can you please check the followings: 1. The expected item is present in the index. 2. Does the item containing Hope or Happiness returned as the result have search scope assigned which is missing for items containing 'philosopher'? – NutsAndBolts May 10 '19 at 10:07
  • Yes and Yes. Now it's solved. Please check my answer. – Bhavesh Maniya May 10 '19 at 10:48
1

I’ve checked the AddFieldByFieldName configuration node under the Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config file. And based on that I’ve added below configuration in the search feature related config file, rebuild the index and verify the functionality again (it's working fine, also verified the Azure query in the Azure search explorer with queryType=full).

<sitecore>
    <contentSearch xdt:Transform="InsertIfMissing">
      <indexConfigurations>
        <defaultCloudIndexConfiguration type="Sitecore.ContentSearch.Azure.CloudIndexConfiguration, Sitecore.ContentSearch.Azure">
          <fieldMap type="Sitecore.ContentSearch.Azure.FieldMaps.CloudFieldMap, Sitecore.ContentSearch.Azure">
            <fieldNames hint="raw:AddFieldByFieldName">
              <field fieldName="contentbody" searchable="YES" retrievable="NO" facetable="YES" filterable="YES" sortable="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure" />
            </fieldNames>
          </fieldMap>
        </defaultCloudIndexConfiguration>
      </indexConfigurations>
    </contentSearch>
  </sitecore>

By default all the index attributes are set to YES. I don’t have strong answer to explain, why it’s working by setting retrievable=”NO”? (required more investigation)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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