Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Find v13.2.6.0 - Unified Search - Storing Lists as part of SearchMetadata

$
0
0

Hi All, 

I've ran into a problem that I'm hoping someone can help me with.

I've written a unified search solution, but need a way of storing additional metadata to items I'm surfacing in search, that will be used to filter against, and build facets from. 

The information I need to store against the unified search items are originally entered via properties decorated with SelectMany attribute (essentially a collection of checkboxes in the CMS UI, stored as a comma separated string)

[SelectMany(SelectionFactoryType = typeof(EnumSelectionFactory<T>))]
        [Display(
            Name = "Document Type",
            Order = 50)]
        [Required]
        public virtual string DocumentType { get; set; }

I then want to ideally store this information as a List<string> but there is nowhere on an ISearchContent type where I can assign the value - there is only one property on this type thats of type IEnumerable ("Categories" - ref: https://world.episerver.com/documentation/developer-guides/search-navigation/NET-Client-API/searching/Unified-search/), but I will need to store many lists of strings - not just the one example above, but up to 6-7 lists potentially. 

I then need to create a FilterBuilder and match on any of the values in the stored string - by conventional means there is no DelegateFilterBuilder I can see that would allow me to do this - there are obviously ones that work on collections, but I can't get the content into the Find index as part of the SearchMetadata as a collection! 

https://world.episerver.com/documentation/developer-guides/search-navigation/NET-Client-API/searching/Filtering/Strings/ 

It looks like my options are limited with ISearchContent - can anyone advise where to go from here? 

Is it possible to create my own DelegateFilterBuilder that splits the stored value and then filters based on that? 

Thanks!

Paul 


Viewing all articles
Browse latest Browse all 6894

Trending Articles