Posted on 16/12/2015 15:46:46
Hi Keld
It will not remove the variants from the index, but from the search result. And you can get a specific variant whereas the variant options are present on the main product as an array on the index document. So if you have a t-shirt, colors blue and red, you can find it searching "t-shirt blue" with the configuration i've mentioned.
You cannot however, search for a product number XYZ which is only present on the variant, where the main product has another product number.
We cannot make a "group by main product" option with the new index - it will not work since the number of records returned from the lucene would not match - that would make facets count wrong, paging act weird etc.
Each variant is a document in the index. We need to make sure that what we return from the index is 1-1 on records retrieved from the database. So if we need to filter out products, it has to be done in the search.
What could be done, was, instead of having one document for each master and variant, have one document in the index with the main product and their variants, holding all variant value as an array of values. I.e - ProductNumber as string[] containing an array of productnumbers.