Gravatar for sohelsd@gmail.com

Question by sohel, Nov 9, 2014 11:13 PM

Unable to connect computed fields to interface

Followed this guide, https://developers.coveo.com/display/public/SC201410/Creating+a+Computed+Field+for+a+Referenced+Item. When I go to Index Browser and look for the new Computed Field I can see the correct field value, but I cannot see it in the facet's interface (they show as "guid NaN" instead of item name). I did specify the computed fieldName to facet layout properties.

Do I have to do anything special in order to display computed field values in the facets instead of guids?

The field I am trying to compute is a Checkbox field. The raw value is a pipe separated list of Guid(s).

Please advise.

Gravatar for mlaporte@coveo.com

Comment by Martin Laporte, Nov 10, 2014 2:56 AM

What type is the custom field that you're using for the computed value? This will be a different field than the one on which the facet is done. The computed field should be of numerical type.

1 Reply
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, Nov 10, 2014 7:37 AM

Hello,

Where did you specify the name of your computed field? On the facet item's 'fieldname' field? You need to make sure the facet is pointing on your new field and not on the older.

Gravatar for sohelsd@gmail.com

Comment by sohel, Nov 10, 2014 3:34 PM

Thanks that I was it. I was trying to specify it as a computed field on the facet sublayout as supposed to field name. I do have an issue though. When the field has multiple values (checkbox with multiple selections), it ignores all the values and only uses the first one. Is there a ways to capture all of them and make them part of the facet?

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Nov 10, 2014 3:53 PM

You need to set the field as 'isMultiValue' in Coveo.SearchProvider.config. You can see more details here : https://developers.coveo.com/display/SC201411/Understanding+the+Coveo+Search+Provider's+Configuration+File

Just set this and reindex the affected items.

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Nov 10, 2014 4:37 PM

And don't forget to accept the answer! :)

Ask a question