add support for filters in getSimilarityMatrix