add facetInit() middleware