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!

TermsFacetFor Missing

Vote:
0

Epi 11.16.0

Find 13.2.6

Having an issue with Facets and with then being missing:

I am adding them to my query:

query
                .TermsFacetFor(x => x.FileType)
                .TermsFacetFor(x => x.FileYear)
                .TermsFacetFor(x => x.Category, facet => facet.Size = 25);

FileType and FileYear (both of type string) are fine and working, Category (which is a List<string>) isn't, even though all results do have a category:

I'm not sure why this would happen. Any help?

#226106
Aug 04, 2020 17:50
Vote:
0

I think it will work if you change Category to be IEnumerable of string (require re-indexing).

#226130
Aug 05, 2020 8:59
Vote:
0

That seems to have fixed the issue where they are all missing. 

Running:

searchResults.TermsFacetFor(x => x.Category)

Seems to be getting some odd results back, string value which don't exist in any of the results, and, the term count is always 0

I have checked all the results and none of the have a category with these terms in, in fact we're indexing episerver built in categorylist element of a page, so it should just be numbers (as strings)

#226133
Aug 05, 2020 9:48
Vote:
0

Ignore me, its because on the query I had set:

query.TermsFacetFor(x => x.Category, x => x.AllTerms = true);
#226135
Aug 05, 2020 9:58
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.