Changed populateIndex to consider a post category 

Hi @slashdotdash, I have done this change as I needed to separated the search between categories. Could you please have a look and merge to your master if you agree. Thanks a mill.