flexsearch
flexsearch copied to clipboard
How to return context (+ or - few lines) around the hits of given search text
Hi,
I am looking for this particular feature.
- Suppose I have text of 100 lines.
- I have created the index and added this text
- I am searching for 2 words.
- These words are found at lines 20, 50 (lets call them as hits)
- In the result set I am looking for text around the hits
- That is something like 15 to 25 lines, 45 to 55 lines
It may not be exactly lines, but it can be few characters/words around the hits. I tried creating contextual index & enrich result set. But none seems to be working. In the results I see the whole 100 lines of text instead of specific hits.
Any help would be highly appreciated