I have a little problem that I can't find a good solution for.
I have articles in a database that have mappings to brand, Colour, Category, Gender, and many more. A web user can filter out articles by choosing the above mentioned entities from drop downlists.
If let's say a user chooses to filter by a brand only articles that is connected to that brand should be returned. My problem is that the gender drop down list, category drop down list and all other list should also be filtered.
What I meen is that I only want the distinct Categories, Brands, Gender, Colours etc from the Articles search result.
The articles search result can be up to 20.000 articles so I don't want to iterate over the result and get the distinct categories, brands etc.