London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Find->TermsFacetFor

Vote:
0

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:
0

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.