# PatternCaptureGroupTokenFilter throwing error - startOffset must be non-negative, and endOffset must be \>= startOffset, and offsets must not go backwards

**URL:** <https://discuss.elastic.co/t/patterncapturegrouptokenfilter-throwing-error-startoffset-must-be-non-negative-and-endoffset-must-be-startoffset-and-offsets-must-not-go-backwards/366199>\
**Category:** Elasticsearch\
**Created:** [September 8, 2024, 10:28am UTC](https://discuss.elastic.co/t/patterncapturegrouptokenfilter-throwing-error-startoffset-must-be-non-negative-and-endoffset-must-be-startoffset-and-offsets-must-not-go-backwards/366199 "2024-09-08T10:28:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [September 9, 2024, 1:42pm UTC](https://discuss.elastic.co/t/patterncapturegrouptokenfilter-throwing-error-startoffset-must-be-non-negative-and-endoffset-must-be-startoffset-and-offsets-must-not-go-backwards/366199/3 "2024-09-09T13:42:22Z")

</div>

Hi @shikha65786,

Welcome! I see you've raised a [similar issue here](https://discuss.elastic.co/t/patterncapturegrouptokenfilter-is-creating-the-same-offset-positions-which-is-causing-highlighting-issue/366200) as well.

To confirm are you using Elasticsearch, or native Lucene? It looks like the latter so I wanted to confirm.

---

_[View the full topic](https://discuss.elastic.co/t/patterncapturegrouptokenfilter-throwing-error-startoffset-must-be-non-negative-and-endoffset-must-be-startoffset-and-offsets-must-not-go-backwards/366199)._
