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

Can I filter by "EndsWith" on PageName?

$
0
0

I'm using:

SearchClient.Instance.UnifiedSearch().For(searchQ)

as the basis for my search, afterwhich I've a bunch of filters I've already implented, but now I need to filter pages OUT that have a PageName that ends with "_Compare"...

I tried using "MatchContainedCaseInsensitive" like soo...

.Filter(x => !((PageData) x).PageName.MatchContainedCaseInsensitive(c => c.ToString(),"_Compare"));

but "c.ToString()" is wrong I think and I dont know what is the correct thing to put in there as "fieldSelector" as I've already selected "pagename".

Any help would be great please.


Viewing all articles
Browse latest Browse all 6894

Trending Articles