Gravatar for ethan.xu@agencyq.com

Question by ethanx, Feb 7, 2018 5:22 PM

How to make list type fields (eg. treelist) multi-value by default

Currently, we have a lot of search faucets in different modules and rebuild index every time we start a new module is time-consuming (sometimes even blocking because of the small image bug that prevents index rebuild to finish normally, and we have to delete the indexes first and then rebuild).

We know how to make a specific field multi-value, but is there a way to make list type fields (eg. treelist) multi-value by default?

Thanks!

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Feb 8, 2018 11:16 AM

Hi,

I understand your pain having to rebuild often during development.

While it is probably possible to achieve this with some custom pipeline processors, I do not recommend attempting it as it can be really harmful to the indexing time depending on the number of list type fields in the Sitecore instance.

A multi-value field in the Coveo index is a special type of facet field. The more facet fields in the index, the longer it is to index new documents as more data structures need to be updated when an index transaction is applied.

Marking all list fields as multi-value would increase the number of facet fields dramatically. However, I doubt you will use them all for faceting in the UI. This means a lot of facet fields will be useless in the index.

Additionally, a Sitecore list field that references other Sitecore items would have GUIDs for its values in the Coveo index as this is what is stored by Sitecore in its database. This type of field always requires a computed index field to index a field or the name of the referenced items instead of its GUID. This cannot be achieved automatically.

By the way, the infinite rebuild caused by very small files has been fixed in the June 2017 release (4.0.1461): https://developers.coveo.com/x/Qx8vAg

I recommend to upgrade to this release or even better, to the latest Coveo for Sitecore 4.1 release which is 100% backward compatible with version 4.0.

Ask a question