Hi, all! I am currently using the default lucene's pattern capture token filter in one of my projects where i have to utilize it for pattern matching. The issue with it is that the default pattern capture token filter gives the same start and end offset for each generated token: the start and end offset as that of the input string. I have to highlight the generated tokens in the text, but instead of highlighting the matches only, it is highlighting the entire text. Is there any way by which i can change the start and end offset of an input string to the positions at which they are found in the input string? I know about the offsetattribute which can be used to set the start and end offsets of the generated tokens, but dont know where and how to implement it inside the pattern capture token filter java file? Any help will be highly useful.