summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Filter/Exists.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Filter/Exists.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Filter/Exists.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Filter/Exists.php b/vendor/ruflin/elastica/lib/Elastica/Filter/Exists.php
new file mode 100644
index 00000000..d6dc9962
--- /dev/null
+++ b/vendor/ruflin/elastica/lib/Elastica/Filter/Exists.php
@@ -0,0 +1,34 @@
+<?php
+namespace Elastica\Filter;
+
+/**
+ * Exists query.
+ *
+ * @author Oleg Cherniy <oleg.cherniy@gmail.com>
+ *
+ * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-filter.html
+ */
+class Exists extends AbstractFilter
+{
+ /**
+ * Construct exists filter.
+ *
+ * @param string $field
+ */
+ public function __construct($field)
+ {
+ $this->setField($field);
+ }
+
+ /**
+ * Set field.
+ *
+ * @param string $field
+ *
+ * @return $this
+ */
+ public function setField($field)
+ {
+ return $this->setParam('field', $field);
+ }
+}