Posted on 01/03/2016 14:48:42
Hi Nuno
I am aware of this issue. We have been discussing a solution for this - a new type of facet that can be used for fields where you have zillion of destinct records.
I would like to see their current solution - what it is. Are they showing a list of 5900 manufacturers on their page? I'm sure they do not treat it as facets - that would give you 5900x30.000 = 177.000.000 combinations that Lucene needs to calculate. That is a lot - and if you add a 3rd facet group of say 100 options, it will be 17.700.000.000 calculations at least. That is also a lot :-).
Prices can NEVER be facets - not like this. You can group them when you index them and use a facet. Otherwise it is a range query which is a different thing showing the highest and lowest of this search. Making it a facet is the same as saying SELECT DESTINCT Price FROM PRODUCT WHERE .... That will not give you anything useful - just a list of all the prices and how many that cost i.e. 299.
Brands I better understand - but not with that many.
We have to make sure in this discussion that we do not confuse filters with facets. Take a look at Zalando - big shop, big website, search is what they live from. They have a brand filter (you cannot see how many of each brand in the current search). There is a BIG difference calculation wise - to see what is present and what is present combined with how many in the given search context.
You can easily create that lists of filtervalues by creating the search on a seperate page where you return the values from a specific field - and you can also add an additional criteria to search i.e. the brand field so you can do AJAX filtering in the search page.
I know it is not super simple - but it is important to understand what facets are and what they do.
We will implement a new type of facet - "Term facet" which will give you a list of values for a given field in the current search (but without the count - that is the expensive one). Then you can render the entire list (5900 brands in your case) or page them, filter them and other great stuff.
BR Nicolai