Gravatar for wvuong@captechconsulting.com

Question by wvuong, Aug 29, 2016 10:35 AM

Rebuild exception when field marked as includeForFreeTextSearch

I have a standard sitecore field which I am trying to included for free text search by adding the following to my custom search provider config file.

            <fieldType patch:after="fieldType[last]" fieldName="my sitecore field" includeForFreeTextSearch="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework"/>

I confirmed this is in my show config and when I try to rebuild my coveomasterindex I get the following exception. And then when viewing the field set for coveomasterindex the field is not there anymore.

Coveo sees the field as numeric. It seems like includeForFreeTextSearch does not work for non string fields?

Job started: IndexUpdateIndexName=Coveomasterindex|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: class MerlinConfig::InvalidConfigException: To be merged with the lexicon, the user field's type must be set to "string".

Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Coveo.AdminService.AdminService.IAdminService.AddFieldsAndRetrieveRejections(CesMasterInformation pInfo, List1 p_FieldConfigs) at Coveo.AdminService.AdminServiceClientWrapper.PerformAdminServiceCall[T](Func1 pFunc) at Coveo.AdminService.AdminServiceClientWrapper.AddFields(List1 p_FieldConfigs) at Coveo.AbstractLayer.FieldManagement.AdminModuleFieldsHandler.CreateFields(List1 pFieldConfigs) at Coveo.AbstractLayer.FieldManagement.AdminModuleFieldsHandler.CreateFieldsWithErrorHandling(List1 p_FieldConfigs) at Coveo.AbstractLayer.FieldManagement.AdminModuleFieldsHandler.CreateFields(IList1 pFieldsToCreate, String pFieldSetName) at Coveo.AbstractLayer.FieldManagement.AdminModuleFieldsHandler.UpdateFieldSetAndFields(String pFieldSetName, String pIndexName, ForeignKeysConfiguration pForeignKeysConfiguration) at Coveo.AbstractLayer.Communication.CES.AdminModule.SetUpRequirements(String pServerUrl, String pTargetSite, Boolean pExpandUsers, ForeignKeysConfiguration pForeignKeysConfiguration, IList`1 pRankingIgnoredFields) at Coveo.AbstractLayer.Communication.CES.CESCommunication.InitializeAdminModule() at Coveo.AbstractLayer.Communication.CES.CESCommunication.Initialize() at Coveo.SearchProvider.AbstractProviderUpdateContext..ctor(ISearchIndexSummary pIndexSummary, IIndexCommunication pCommunication) at Coveo.SearchProvider.ProviderUpdateContext..ctor(ISearchIndex pIndex, IIndexCommunication pCommunication) at Coveo.SearchProvider.ProviderIndex.CreateUpdateContext() at Coveo.SearchProvider.ProviderIndex.b3e() at Coveo.SearchProvider.ProviderIndex.TryPerformIndexingOperation(IndexingOptions pIndexingOptions, Action p_Action) at Coveo.SearchProvider.ProviderIndex.Rebuild() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Jobs.Job.ThreadEntry(Object state)

1 Reply
Gravatar for dberube@coveo.com

Answer by Dominic Berube, Aug 29, 2016 11:02 AM

Hi,

The 'includeForFreeTextSearch' flag is only available to string fields. What is the type of your field.

We will add a validation in Coveo for Sitecore so the error is more descriptive and add a note in our documentation.

Dom

Gravatar for wvuong@captechconsulting.com

Comment by wvuong, Aug 29, 2016 11:06 AM

Coveo recognizes it as a numeric field. I created a computed field so that I could designate it a string.

Ask a question