diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-01-10 20:53:32 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-01-10 20:53:32 +0300 |
commit | 03b39019da903dc98eec80347dafc0368ff6face (patch) | |
tree | 4e52ecfa762989df9b0677cefc3989c77cfeea5b /lib/Model | |
parent | 509993e3e33bf8f6d405adca61cb0e084f6f47a4 (diff) |
renaming index status
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Index.php | 13 | ||||
-rw-r--r-- | lib/Model/ProviderIndexes.php | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/Model/Index.php b/lib/Model/Index.php index c9525ca..1f432f0 100644 --- a/lib/Model/Index.php +++ b/lib/Model/Index.php @@ -28,12 +28,13 @@ namespace OCA\FullTextSearch\Model; class Index implements \JsonSerializable { - const STATUS_INDEX_IGNORE = 16; - const STATUS_INDEX_FAILED = 32; - const STATUS_INDEX_THIS = 1; - const STATUS_INDEX_DONE = 2; - const STATUS_REMOVE_DOCUMENT = 4; - const STATUS_DOCUMENT_REMOVED = 8; + const INDEX_OK = 1; + const INDEX_IGNORE = 2; + const INDEX_META = 4; + const INDEX_CONTENT = 8; + const INDEX_ALL = 12; + const INDEX_REMOVE = 16; + const INDEX_FAILED = 32; const ERROR_FAILED = 1; const ERROR_FAILED2 = 2; diff --git a/lib/Model/ProviderIndexes.php b/lib/Model/ProviderIndexes.php index 8b747fc..f9ce3e9 100644 --- a/lib/Model/ProviderIndexes.php +++ b/lib/Model/ProviderIndexes.php @@ -66,13 +66,13 @@ class ProviderIndexes { $index = $this->getIndex($document->getId()); if ($index === null) { $index = new Index($document->getProviderId(), $document->getId()); - $index->setStatus(Index::STATUS_INDEX_THIS); + $index->setStatus(Index::INDEX_ALL); $index->setLastIndex(); } $document->setIndex($index); - if ($index->getStatus() !== Index::STATUS_INDEX_DONE) { + if ($index->getStatus() !== Index::INDEX_OK) { return false; } |