November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hello Rob
An approach you can use is to use an extension method to push additional fields into your index that can then be faceted on. This has been discussed over in this thread:
David
HI David,
Thanks for the reply, however we're trying to allow Editors to add new properties to a product using MetaFields and have them as facets, all without having to do a deployment, so we wouldn't be able to create an extension method to push those new fields in to the index.
Is there any other way of creating a facet based on product.Property["x"]?
Thanks
Rob
I don't think it's possible yet, not in an easy way however. I will make sure the PM get's this information so we can create a way of doing facets against not strongly typed properties.
Hi Jonas
Thanks for the reply. It would be good to be able to do this out of the box, however, I have found a way around this in our case. I can create an extension method on our product class which loops through the metafields and adds them to a Dictionary object. We then include that extension method in the index in our initialization module. I also store a reference to the metafields we want to facet against in DDS, then, when building my facets, I can get those values from DDS and loop through, creating a facet for each, based on the values in the dictionary object.
It sounds much more complicated than it actually is, but I've managed to get it working. I sense a blog post coming up! :)
Thanks
Rob
Certainly sounds blog-worthy Rob - I'd be very interested in seeing that :)!
Hi David, the blog is now live :)
http://www.dev24seven.com/2015/11/09/faceting-on-metafields-in-episerver-commerce-with-episerver-find/
Thanks
Rob
I'm trying to create a dynamic faceting feature by using TermsFacetFor and a dynamic MetaField property. My first thought was to do something like:
However that doesn't return me any facets. If i use a field defined in my BaseProduct class (eg. TermsFacetFor(x => x.BaseColour), it works, but this won't allow me to acheive what I'm trying to acheive. Has anybody managed to get the idea above working?? If so, how?