i have to store a simple document like:
{content : "The cat is mine"}
but before indexing i should replace (tag) specific words, "cat" is one of them. The result (indexed document) should be:
{content : "The <pet>cat</pet> is mine"}
I read something about highlighting specific words (with specific html tag too) but highlighting is for queries.
I need this operation before indexing. Another problem is that i have many tags (around 100.000!) with their groups (pet, car, flowers etc).
At the moment, before saving the document, i do a query for each word of the text to find if it is a tag or not, if yes i add <group_name>word</group_name>
This is a very slower solution. Alternatives?