Bugfix: prevent corrupting the table with foreign_id=0

This could happen before when deleting an indexed model (because mooc_join_table is not part of the key in the relation).
If you have corrupted values in jayps_search_word_occurence, you should reindex the full table.