allow reuse of the core logic from get_similar_entries template tag