The output i want is to show the text i searched let's say "search" in the document where it occured. Like this:
the text i want to search is this and it should be highlighted as this . Search currently is giving just the word "search". The result i want is to highlight the searched word in the document. How can i do that. Doesn't getBestFragment() return the whole fragment(or the document) in which the searched word occur or does it give just the word. How can i achieve this?