: So for example, i have a document : cars - 10% off : and I search for word "discount", this document should be returned aswell. : : In synonyms file, I have written : discount => *%
I would implement something like this by having something at index time like the PatternReplaceTokenFilter at index time that checks for the pattern ".*\%\s+off" and replaces it with the word "discount" -- but this would be tricky to get working just right dependent on what type of tokenization i was using. Alternately, i would use an UpdateProcessor to check key text fields for that same expression, and add a new "discounted=true" boolean field to documents where it was found (ie: before text analysis ever happened) -Hoss