From c4003c67958d26aeaf80bd55a534ff7ef8f98bff Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Wed, 8 Jul 2015 10:13:06 +0300
Subject: [PATCH] Add regexp filter doc.

---
 docs/Filter/Regexp.md | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 docs/Filter/Regexp.md

diff --git a/docs/Filter/Regexp.md b/docs/Filter/Regexp.md
new file mode 100644
index 0000000..99e8c03
--- /dev/null
+++ b/docs/Filter/Regexp.md
@@ -0,0 +1,32 @@
+# Regexp Filter
+
+> More info about regexp filter is in the [official elasticsearch docs][1]
+
+The regexp filter allows you to use regular expression term queries.
+The regexp filter is similar to the [regexp query][2],
+except that it is cacheable and can speedup performance in case you are
+reusing this filter in your queries.
+
+## Simple example
+
+```JSON
+{
+    "regexp":{
+        "name.first": "s.*y"
+    }
+}
+```
+
+And now the query via DSL:
+
+```php
+$regexpFilter = new RegexpFilter('name.first', 's.*y');
+
+$search = new Search();
+$search->addFilter($regexpFilter);
+
+$queryArray = $search->toArray();
+```
+
+[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-indices-filter.html
+[2]: ../Query/Regexp.md
\ No newline at end of file
-- 
GitLab