Hi Gus, Thank you your reply! In my search system; users are complaining that they get results with negation terms when don't expect. As explained in my original post. User don't want to get documents having a term like "Non Vitamin K" when they search for "Vitamin K".
But because each terms are analyzed and tokenized, currently this system does return both the docs. There are few more negation prefixes that we are trying to handle. Further, I did find a way to solve this problem. I assigned tokenStream to each field and avoid use of analyzer. This way I am able to control the full string assigned to a field for tokenization. Also, I wish to clarify that though we wish to handle the negation searches as above, end user are not expected to notice the difference in text ( i.e. a Non Vitamin K will be stored as Non Vitamin K only but its tokenized form would be tweaked so that it does not results in a search of "Vitamin K") I will take cue from your advise and avoid such desperation in future. Regards Amitesh -- Sent from: https://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org