Faceted Navigation presented by me at the Wildcardconf 2015 (http://wildcardconf.com). Examples when Faceted Navigation done right and wrong, observations what should be avoided and what should be implemented to achieve goal of Faceted Navigation.
30. Frontend > Backend Backend > Frontend
More logic on Frontend More logic on Backend
Faster Queries Complicated Queries
Complicated Frontend Complicated Frontend
Hard to Scale Easy to Scale
Smaller Response Size Bigger Response Size
We’ve chosen the right solution
Left solution Right solution
31. Backend is doing all the heavy work.
Building all queries, calculating differences
between initial set of data and filtered.
46. Specifications are the hard part
Condition, Magnification, Length, Reticle
We should know product counts with such specifications
47. To achieve that we’ve separated specifications and
specification values into different fields in Product Object
48. To achieve that we’ve separated specifications and
specification values into different fields in Product Object
49. #1 First query to ElasticSearch
Return products, prepare initial aggregations
do not apply any specific filters, except global ones
Result
We will have all products that match initial criteria
(page, limit, orderable) and all facets that selected
products have.
50. #2 Second query to ElasticSearch
Run the same query as previous, but add filtered results
and make this query to return only aggregations (facets)
Result
You’ll get filtered aggregations that match your criteria