Try our conversational search powered by Generative AI!

Find->TermsFacetFor

Vote:
 

Hi Team,

How to add condition in TermFacet.

.TermsFacetFor(x => x.ModelYears.SearchTerm, x => x.Size = TermsCount)

How to write condition like (x => x.ModelYears.SearchTerm.where(y=>year.any(c=>x.Endswith(y))

Ex:

Modelyears={xxx-2001,yyy-2013} 

year={2001}

I need only xxx-2001 in FacetTerm.

Please Help me out,

Regards,

Karthik

#199221
Edited, Nov 20, 2018 18:49
Vote:
 

What if you create another ModelYears field which only contains Year instead of xxx-Year or yyy-Year.

You can then index this computed field and use TermsFacetFor on it.

Here's a link to include computed fields in Episerver:

https://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2015/5/best-pratice-for-including-information-that-does-not-exist-on-content/

#199411
Nov 26, 2018 16:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.