Highlighting with exact match
I have a need to use lucene for snippet generation and highlighting. I would like to be able to find and highlight exact matches within a document. For example if one searches for "oracle 8i" I do not want to highlight the word oracle. I only want to highlight "oracle 8i" without the quotes. I am not using lucene as my search engine. Another system has already found the document and lucene is only responsible for highlighting and generating a snippet from the found text.
When using the SimpleAnalyzer, lucene treats each word as a term and highlights every word individually. I do not get any matches using KeywordAnalyzer.
Your help is greatly appreciated.