# includeFlags in TermBuilders for Elasticsearch 2.0?

**URL:** <https://discuss.elastic.co/t/includeflags-in-termbuilders-for-elasticsearch-2-0/39923>\
**Category:** Elasticsearch\
**Created:** [January 22, 2016, 7:50pm UTC](https://discuss.elastic.co/t/includeflags-in-termbuilders-for-elasticsearch-2-0/39923 "2016-01-22T19:50:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apanimesh061](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apanimesh061/32/927_2.png) [@apanimesh061](https://discuss.elastic.co/u/apanimesh061)\
**Post date:** [January 22, 2016, 7:50pm UTC](https://discuss.elastic.co/t/includeflags-in-termbuilders-for-elasticsearch-2-0/39923/1 "2016-01-22T19:50:12Z")

</div>

How can I find `includeFlags` which was earlier in Elasticsearch `TermBuilders`?

This is only present in `SignificantTermBuilders`!!

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [January 26, 2016, 2:01pm UTC](https://discuss.elastic.co/t/includeflags-in-termbuilders-for-elasticsearch-2-0/39923/2 "2016-01-26T14:01:08Z")

</div>

Hi,

thanks for spotting this. I have created the following tickets on Github:

- Add regex flags to TermsBuilder: [https://github.com/elastic/elasticsearch/issues/16228](https://github.com/elastic/elasticsearch/issues/16228)
- Align the regex implementation in SignificantTermsBuilder and TermsBuilder: [https://github.com/elastic/elasticsearch/issues/16231](https://github.com/elastic/elasticsearch/issues/16231)

However, note that the internal implementation has changed from `java.util.Regex` to `org.apache.lucene.util.automaton.RegExp` so the newly exposed flags will have different semantics (see the [Lucene docs on Regexp](http://lucene.apache.org/core/4_9_0/core/org/apache/lucene/util/automaton/RegExp.html)) once the tickets are implemented.

Daniel

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:21pm UTC](https://discuss.elastic.co/t/includeflags-in-termbuilders-for-elasticsearch-2-0/39923/3 "2017-07-05T23:21:26Z")

</div>


