Changed multiple topic search query to return ids