Indexing Multilist/Treelist fields and reading them back

Whilst in the process of ensuring Multilist/Treelist fields are being indexed and pulled back correctly, I came across a very useful blog post to assist in converting a list of GUID’s in the index back to an ID array

This works like a dream 🙂 Don’t forget to update your index config to reflect that you want to ensure that your field is being indexed (below is an example). The important part of this is ensuring “type” is set to “System.GUID”

<field fieldName="updated_specifications" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.GUID" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
<analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />

Also, you need to alter the definition of Droptree (or TreeListEx, or whatever field you are indexing) in <fieldTypes> section. By default the storageType is set to “NO”, change this to “YES”

Reindex your site with the TypeConverter and alterations to your index config and you should be good to go 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s