first implementation of faceted search