aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/FullTextSearch/Model
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-02-16 09:40:12 -0100
committerMorris Jobke <hey@morrisjobke.de>2019-02-19 11:05:50 +0100
commit29a98215835f06236149d209c0e2583164a3a3df (patch)
tree9d6e2324674cc983540492c74f076053951bbd6e /lib/public/FullTextSearch/Model
parente20292f174469fa4ab17a09cc63c2395ca60ee53 (diff)
downloadnextcloud-server-29a98215835f06236149d209c0e2583164a3a3df.tar.gz
nextcloud-server-29a98215835f06236149d209c0e2583164a3a3df.zip
Add hasIndex() to OCP\FullTextSearch\Model\IndexDocument
Signed-off-by: Maxence Lange <maxence@artificial-owl.com> Co-Authored-By: daita <maxence@artificial-owl.com>
Diffstat (limited to 'lib/public/FullTextSearch/Model')
-rw-r--r--lib/public/FullTextSearch/Model/IndexDocument.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/public/FullTextSearch/Model/IndexDocument.php b/lib/public/FullTextSearch/Model/IndexDocument.php
index 78679ac6225..d00a8461ee8 100644
--- a/lib/public/FullTextSearch/Model/IndexDocument.php
+++ b/lib/public/FullTextSearch/Model/IndexDocument.php
@@ -183,6 +183,17 @@ class IndexDocument implements JsonSerializable {
return $this->index;
}
+ /**
+ * return if Index is defined.
+ *
+ * @since 16.0.0
+ *
+ * @return bool
+ */
+ final public function hasIndex(): bool {
+ return $this->index !== null;
+ }
+
/**
* Set the modified time of the original document.