Gravatar for chris.williams@readwatchcreate.com

Question by chris williams, May 5, 2016 6:58 AM

Reference Computed field not showing up in index

I am applying the above here are my field type and field entries

<fieldtype fieldname="productlevel1title" isfacet="true" ismultivalue="true" settingtype="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework"/>
<fieldtype fieldname="productlevel2title" isfacet="true" ismultivalue="true" settingtype="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework"/>
<fieldtype fieldname="productlevel3title" isfacet="true" ismultivalue="true" settingtype="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework"/>

<field fieldname="productlevel1title" sourcefield="productlevel1" referencedfieldname="optionsetting">Coveo.SearchProvider.ComputedFields.ReferencedFieldComputedField, Coveo.SearchProviderBase</field>
<field fieldname="productlevel2title" sourcefield="productlevel2" referencedfieldname="optionsetting">Coveo.SearchProvider.ComputedFields.ReferencedFieldComputedField, Coveo.SearchProviderBase</field>
<field fieldname="productlevel3title" sourcefield="productlevel3" referencedfieldname="optionsetting">Coveo.SearchProvider.ComputedFields.ReferencedFieldComputedField, Coveo.SearchProviderBase</field>

I created the facets under buckets facets. But after publishing and rebuilding the index I dont see the productlevel1title fields in the index only the productlevel1 field. What am I doing wrong? What would cause them not to show up in the index?

alt text

2 Replies
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, May 5, 2016 11:15 AM

Hi,

The blog post you mentioned is a fix only for the items attributes that are not item fields like name, displayname, id, etc. Itsm fields are correctly handled by the ReferencedFieldComputedField class. This is not your case here.

What's the type of your optionsetting fields? I guess it's not another reference field but a value type like string, integer…

Your configuration should work correctly if you inserted the XML elements in the right nodes. You can validate your changes to the configuration file worked correctly by looking at the ShowConfig.aspx. Maybe your XML is invalid. I notice that all your XML attributes are in lowercase. I think it might be your problem. The XML element names and their attribute names are case sensitive. It's fieldType, fieldName, isFacet, isMultiValue, settingType, sourceField and referenceFieldName.

Also, you can check in the Sitecore logs for any error while synchronizing the fields with CES or while indexing the items. You might discover the cause of the issue.

If there's no errors in the logs, look at your fields sets in CES. Is your field present in the fields sets? If it is, it means the field configuration is ok in Sitecore.

Then, look again at your indexed document fields in the CES Index Browser. Sort by indexed date and find a document that should have a value for the new fields. Check its indexed date to be sure it was indexed in your last rebuild and check its fields.

I hope this helps.

Jeff

Gravatar for chris.williams@readwatchcreate.com

Comment by chris williams, May 6, 2016 11:13 AM

Thanks rebuild was failing for those items. I resolved that issue and the fields showed up. Thanks a lot for your help.

Gravatar for chris.williams@readwatchcreate.com

Answer by chris williams, May 5, 2016 8:36 AM

I found a blog post that looks like it has the answer but it means having to derive from the existing coveo reference field and then fixing an issue. I used ilspy myself and realized my version has the issue too. Not sure if it is fixed in version 4 as I am on 3.x Here is the article that explains. https://jermdavis.wordpress.com/2015/09/01/coveo-facets-based-on-id-fields/

Ask a question