[AI-223] Filter by attributes (refactor query,
pivotsiteshandlerlocaltest)