# \[ANN\] Trigram accelerated regex queries for Elasticsearch version 0.0.2 released

**URL:** <https://discuss.elastic.co/t/ann-trigram-accelerated-regex-queries-for-elasticsearch-version-0-0-2-released/20665>\
**Category:** Elasticsearch\
**Created:** [November 10, 2014, 4:08pm UTC](https://discuss.elastic.co/t/ann-trigram-accelerated-regex-queries-for-elasticsearch-version-0-0-2-released/20665 "2014-11-10T16:08:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 10, 2014, 4:08pm UTC](https://discuss.elastic.co/t/ann-trigram-accelerated-regex-queries-for-elasticsearch-version-0-0-2-released/20665/1 "2014-11-10T16:08:54Z")

</div>

On Friday I released version 0.0.2 of an Elasticsearch plugin to perform  
accelerated regular expression search against source documents. This  
version has stability and speed improvements for complex queries. It:

1. Prevents the compilation step from consuming tons and tons of memory.  
Now it'll throw an exception if it tries to compile a regex that is too big.
2. Prevents complex regular expressions from performing hundreds of term  
queries against the trigrams. There is now a parameter to limit the number  
of term queries that are attempted to prefilter the documents. This  
prevents memory exhaustion.
3. Speeds up some of the internals of the compilation step several orders  
of magnitude for complex queries.

If you are brave enough to have used version 0.0.1 of this plugin you  
should certainly upgrade to version 0.0.2.

As always you can try it on our beta site:

- Find links to files or templates  
[http://simple.wikipedia.beta.wmflabs.org/w/index.php?title=Special%3ASearch&profile=default&search=insource%3A%2F\[\[(file%3A|template%3A)[^\]]\*\]\]%2F&fulltext=Search](http://simple.wikipedia.beta.wmflabs.org/w/index.php?title=Special%3ASearch&profile=default&search=insource%3A%2F%5C%5B%5C%5B%28file%3A%7Ctemplate%3A%29%5B%5E%5C%5D%5D*%5C%5D%5C%5D%2F&fulltext=Search)
- Find links within 10 characters of each other  
[http://simple.wikipedia.beta.wmflabs.org/w/index.php?title=Special%3ASearch&profile=default&search=insource%3A%2F\[\[[^\]]\*\]\].{0%2C20}\[\[[^\]]\*\]\]%2F&fulltext=Search](http://simple.wikipedia.beta.wmflabs.org/w/index.php?title=Special%3ASearch&profile=default&search=insource%3A%2F%5C%5B%5C%5B%5B%5E%5C%5D%5D*%5C%5D%5C%5D.%7B0%2C20%7D%5C%5B%5C%5B%5B%5E%5C%5D%5D*%5C%5D%5C%5D%2F&fulltext=Search)
- Prove that complex queries don't eat all of memory  
[http://simple.wikipedia.beta.wmflabs.org/wiki/Special:Search?search=insource%3A%2F\[\[(Datei|File|Bild|Image)%3A[^]]\*alt%3D[^]|}]{50%2C200}%2F&go=Search](http://simple.wikipedia.beta.wmflabs.org/wiki/Special:Search?search=insource%3A%2F%5C%5B%5C%5B%28Datei%7CFile%7CBild%7CImage%29%3A%5B%5E%5D%5D*alt%3D%5B%5E%5D%7C%7D%5D%7B50%2C200%7D%2F&go=Search)

Nik

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd3aCYYZ1dFwj33un1HFzY4N%2BhK%2BsHc39VDuk9SBZoD%3Dgw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd3aCYYZ1dFwj33un1HFzY4N%2BhK%2BsHc39VDuk9SBZoD%3Dgw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:51am UTC](https://discuss.elastic.co/t/ann-trigram-accelerated-regex-queries-for-elasticsearch-version-0-0-2-released/20665/2 "2017-07-06T00:51:05Z")

</div>


