Having an issue with Facets and with then being missing:
I am adding them to my 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?
I think it will work if you change Category to be IEnumerable of string (require re-indexing).
That seems to have fixed the issue where they are all missing.
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)
Ignore me, its because on the query I had set:
query.TermsFacetFor(x => x.Category, x => x.AllTerms = true);