Adds combine_dictionary function to combine db cursors from index lookup to a single query for word hits.