optimize getPostIndices

only use 1 set when its in a topic