I want to get the excerpt(5 words before and after the search term) for the given fulltext search. I am trying hit.getExceprt() and it returns null. I know that I can set the excerpt properties in web console, but we can only set the jcr:properties there and I am not sure how to specify the content to include in the excerpt.
I also read that you can write a query in the indexer to index the summary. I am not sure how this is done and if it is the best approach.