Need help in selecting right analyzer for exact string match with offsets

I am new to elasticsearch. In my case I have html files all containing 2 exactly matching strings. My job is to find those 2 strings and capture the text between them. So if I can get offset of first string and offset of second string then it can be captured. Now when I index these html files, _AFAIK search api doesn't give offsets but analyze api does. Please note getting offsets is the goal. I am a java developer so I am using java to write elasticsearch client and try to make calls to _analyze to fetch json with offsets. I don't know elastic search api much as well. And I am not sure which analyzer to use and which combination of filters and tokenizers would be best in this case. I know this is a trivial question but for me now its a bit confusing.

Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.