Oops some minor typos in the text above...
I guess I'm also looking for a TermsFacetFor() method which also takes string and not an expression, at least for ITypeSearch<TSource>.
First I was thinking of adding an extension method that returns a NameValueCollection which hold all the possible filters for all PageData objects and indexing it. And just filter by that method, BUT there is no DelegateFilterBuilder extension method that extends NameValueCollection.
Hi Johan,
To make things a little clearer, could you post a bit more code, especially parts of the page type class that you're working with?
Maybe I overshoot here a little bit. Found this project https://github.com/x2find/Dictionary2Find, and that suits my needs perfect.
I think a dictionary with metadata should be a part of UnifiedSearch, right built-in.
Great! Guess you found this thread already?
ISearchContent.SearchMetaData, although I believe you'll have to project whatever you need from it back :)
Yeah of course you have to do that. But it's also a lot easier to build a nice global search page with multiple facets.
Yeah. There's room for improvements in terms of facet handling in unified search.
Hi,
Let's say we have facets that are quite dynamic that an editor can create by editing a field in EPiServer which makes it hard for us in the code.
I've made a model that holds all TermsFacets with TermCounts and which ones that are selected (by parsing the querystring) and each TermCount's url. Basically everything you need to render everything.
This makes it easy to bind the data to two nested repeaters, one for the TermFacets and the other one for the TermCounts. This makes it also easy to make it possible to select TermCounts from two different TermFacets, because all selected TermCounts is stored in the same querystring parameter prefixed with the name of the TermFacet.
The TermsFacets and TermCounts was easy to get hold off and parse. But when one TermCount (with its corresponding TermFacet) is selected how can I add that term to the Filter with just a string representing the TermFacet and one one with the value?
I have a NameValuCollection (the Filter property in the code example below) where the key is the TermFacet and the values is the selected TermCounts.
In this case I have to know which property/method (SearchTypeName()) I want to filter by. Is it possible to do something like this!?
Hope all this makes sense...
Hope all this makes sense...