2

We have a sitecore 9.1.1 CM instance configured to use Azure Cloud. We have the relevant configurations enabled & disabled for each instance.

However we are seeing the following:

16784 22:55:11 WARN  Could not compute value for ComputedIndexField: potential for indexable: sitecore://master/{3FF23DB1-A0F7-46DF-84D3-E17FCC19CB06}?lang=ar-AE&ver=2
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters)
   at Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.Xdb.Reporting.Datasources.Remote.RemoteReportDataSourceProxy.GetData(ReportDataQuery query)
   at Sitecore.Xdb.Reporting.ReportDataProvider.ExecuteQueryWithCache(ReportDataQuery query, ReportDataSource dataSource, CachingPolicy cachingPolicy)
   at Sitecore.Xdb.Reporting.ReportDataProvider.GetData(String dataSourceName, ReportDataQuery query, CachingPolicy cachingPolicy)
   at Sitecore.Xdb.Reporting.ReportingQueryBase.ExecuteQuery(Dictionary`2 parameters)
   at Sitecore.ContentTesting.Analytics.Reporting.TestPotentialQuery.Execute()
   at Sitecore.ContentTesting.ContentSearch.ComputedIndexFields.TestPotentialMetricBase.ComputeFieldValue(IIndexable indexable)
   at Sitecore.ContentSearch.AbstractDocumentBuilder`1.<>c__DisplayClass57_0.<AddComputedIndexFieldsInParallel>b__0(IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState)

Nested Exception

Exception: System.ArgumentException
Message: Service Host URI is not a valid URI.
Parameter name: serviceHostUrl
Source: Sitecore.Framework.Conditions
   at Sitecore.Framework.Conditions.RequiresValidator`1.ThrowExceptionCore(String condition, String additionalMessage, ConstraintViolationType type)
   at Sitecore.Framework.Conditions.Throw.ValueShouldBeTrue[T](ConditionValidator`1 validator, String conditionDescription)
   at Sitecore.Analytics.Core.ConfigurationBasedHttpTransportFactory..ctor(String serviceHostUrl, String timeout, BaseLog logger)
   at Sitecore.Analytics.Core.ApiKeyHttpTransportFactory..ctor(String serviceHostUrl, Boolean requireHttps, String connectionStringName, String headerName, String minimalApiKeyLength, String timeout)

I know the computed index is defined by configuration for sitecore_suggested_text_index. The easiest option is to disable the fields but not really a fan of turning things off because they aren't working.

I'd like to know if we are missing something or if we do turn it off what is the potential setback of turning off fields potential, impact and recommendation?

Also can confirm that the azure search connection string is correct.

1
  • did you checked if your processing and reporting roles are correctly configured. And also you have made proper configurations in your CM instance to use the reporting instance? Seems like a similar issue community.sitecore.net/developers/f/9/t/5594
    – Atul Kumar
    Commented Jul 2, 2020 at 6:38

1 Answer 1

1

These errors can be caused if sitecore content testing has been disabled, you can verify this in the App_Config\Sitecore\ContentTesting\Sitecore.ContentTesting.config file:

<setting name="ContentTesting.AutomaticContentTesting.Enabled" value="false" />

Content tests let you test alternative variants of your website’s content to find out which pages, components, or combinations of components are the most effective with visitors. The content or components that you are comparing in a test should be designed to achieve the same goal.

You can take a look at the sitecore content testing glossary documentation https://doc.sitecore.com/users/93/sitecore-experience-platform/en/experience-optimization-and-content-testing-glossary.html

If you don't use this feature in your sitecore setup then the three fields must also be removed through a patch config file:

               <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.Azure.CloudSearchProviderIndex, Sitecore.ContentSearch.Azure">
                    <configuration ref="contentSearch/indexConfigurations/defaultCloudIndexConfiguration">
                        <fieldMap ref="contentSearch/indexConfigurations/defaultCloudIndexConfiguration/fieldMap">
                            <fieldNames hint="raw:AddFieldByFieldName">
                                <field fieldName="impact" returnType="double">
                                    <patch:delete />
                                </field>
                                <field fieldName="potential" returnType="double">
                                    <patch:delete />
                                </field>
                                <field fieldName="recommendation" returnType="double">
                                    <patch:delete />
                                </field>
                            </fieldNames>
                        </fieldMap>
                        <documentOptions ref="contentSearch/indexConfigurations/defaultCloudIndexConfiguration/documentOptions">
                            <fields hint="raw:AddComputedIndexField">
                                <field fieldName="impact" returnType="double" type="Sitecore.ContentTesting.ContentSearch.ComputedIndexFields.TestImpactMetric, Sitecore.ContentTesting" >
                                    <patch:delete />
                                </field>
                                <field fieldName="potential" returnType="double" type="Sitecore.ContentTesting.ContentSearch.ComputedIndexFields.TestPotentialMetric, Sitecore.ContentTesting" >
                                    <patch:delete />
                                </field>
                                <field fieldName="recommendation" returnType="double" type="Sitecore.ContentTesting.ContentSearch.ComputedIndexFields.TestRecommendationMetric, Sitecore.ContentTesting" >
                                    <patch:delete />
                                </field>
                            </fields>
                        </documentOptions>
                    </configuration>
                </index>
1
  • If using above snippet, take note of the first line: type="Sitecore.ContentSearch.Azure.CloudSearchProviderIndex, Sitecore.ContentSearch.Azure" you will need to change this if you are using something other than Azure Search provider. Commented Oct 18, 2021 at 11:11

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.