Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Questions about TermsFacetFor and AllTerms

$
0
0

Does TermsFacetFor return the facet count as in an un-filtered search although a filter is applied?

On my site, I have two facets: PropertyA and PropertyB. Say, that I have two pages on my site. The first page has the following values:

PropertyA = 1

PropertyB = 2

The second page has

PropertyA = 4

PropertyB = 5

If I filter my results on PropertyA==1, like:

search.Filter(x => x.PropertyA.In([1]))

and I apply TermsFacetFor() for both PropertyA and PropertyB during my search, one should think that my facets in the search result would hold only TermCounts for the values of PropertyB that are among the search results, that is, 2. But when I run the tests, TermsCounts are returned for both 2 and 5 in the facet for PropertyB.

Is that correct behaviour?

Will AllTerms=true always return facets for all languages?

I have a site that is available in Danish and English. When I set AllTerms=true inside TermsFacetFor, it seems that the list of TermsFacet objects holds TermCounts for all facet values in both Danish and English, although I have specified the search to be within one language, fx. I set

search.FilterForVisitor("en")

Say, that I invoke TermsFacetFor to get facets for my property PropertyC. This is a culture-specific property, so the value of PropertyC can be "XXX" in English and "YYY" in Danish on the same page. When I apply TermsFacetFor with AllTerms = true in my search, I get a TermCount object for both "XXX" and "YYY".

Is that correct behaviour or am I missing something?

Thanks!


Viewing all articles
Browse latest Browse all 8020

Trending Articles