diff --git a/docs/Query/Term.md b/docs/Query/Term.md new file mode 100644 index 0000000000000000000000000000000000000000..a71ceb1c2232a00de27ed7110d94bc1325ea3d26 --- /dev/null +++ b/docs/Query/Term.md @@ -0,0 +1,27 @@ +# Term Query + +> More info about term query is in the [official elasticsearch docs][1] + +The term query finds documents that contain the exact term specified in the inverted index. + + +## Simple example + +```JSON +{ + "term" : { "user" : "Kimchy" } +} +``` + +In DSL: + +```php +$termQuery = new TermQuery('user', 'Kimchy'); + +$search = new Search(); +$search->addQuery($termQuery); + +$queryArray = $search->toArray(); +``` + +[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html