Hi!

Is there a way to retrieve a List of the matching words for a Hit?

For example I create a query like this one:

"Paris London -Stockholm"

Now I get a Hit object with a couple of results back where I can iterate
over the documents:

for (int i = 0; i < hits.length(); i++) {
                Document doc = hits.doc(i);
                doc.get("whatever");
}

How do I know which words have been found in a document? In one it could be
Paris, in another it could be London or both!

I would need this information in order to highlight those words if I display
the search results to the user.

Thanks!

Samuru

Reply via email to