From a89788f3e3d2fdebb225953e276c1f64123e6416 Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Fri, 3 Jul 2015 14:08:28 +0300
Subject: [PATCH] Add prefix query doc.

---
 docs/Query/Prefix.md | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 docs/Query/Prefix.md

diff --git a/docs/Query/Prefix.md b/docs/Query/Prefix.md
new file mode 100644
index 0000000..32cda59
--- /dev/null
+++ b/docs/Query/Prefix.md
@@ -0,0 +1,26 @@
+# Prefix Query
+
+> More info about prefix query is in the [official elasticsearch docs][1]
+
+Matches documents that have fields containing terms with a specified prefix.
+
+## Simple example
+
+```JSON
+{
+    "prefix" : { "user" : "ki" }
+}
+```
+
+In DSL:
+
+```php
+$prefixQuery = new PrefixQuery('user', 'ki');
+
+$search = new Search();
+$search->addQuery($prefixQuery);
+
+$queryArray = $search->toArray();
+```
+
+[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html
-- 
GitLab