aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/FullTextSearch/Model
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/FullTextSearch/Model')
-rw-r--r--lib/public/FullTextSearch/Model/IDocumentAccess.php24
-rw-r--r--lib/public/FullTextSearch/Model/IIndex.php83
-rw-r--r--lib/public/FullTextSearch/Model/IIndexDocument.php30
-rw-r--r--lib/public/FullTextSearch/Model/IIndexOptions.php24
-rw-r--r--lib/public/FullTextSearch/Model/IRunner.php34
-rw-r--r--lib/public/FullTextSearch/Model/ISearchOption.php25
-rw-r--r--lib/public/FullTextSearch/Model/ISearchRequest.php26
-rw-r--r--lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php66
-rw-r--r--lib/public/FullTextSearch/Model/ISearchResult.php26
-rw-r--r--lib/public/FullTextSearch/Model/ISearchTemplate.php26
10 files changed, 144 insertions, 220 deletions
diff --git a/lib/public/FullTextSearch/Model/IDocumentAccess.php b/lib/public/FullTextSearch/Model/IDocumentAccess.php
index 84ce46db361..407f0f2bb28 100644
--- a/lib/public/FullTextSearch/Model/IDocumentAccess.php
+++ b/lib/public/FullTextSearch/Model/IDocumentAccess.php
@@ -1,27 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -45,8 +27,6 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface IDocumentAccess {
-
-
/**
* Owner of the document can be set at the init of the object.
*
diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php
index dad10c934de..13aee916498 100644
--- a/lib/public/FullTextSearch/Model/IIndex.php
+++ b/lib/public/FullTextSearch/Model/IIndex.php
@@ -1,28 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -43,24 +24,84 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface IIndex {
+ /**
+ * @since 15.0.0
+ */
public const INDEX_OK = 1;
+
+ /**
+ * @since 15.0.0
+ */
public const INDEX_IGNORE = 2;
+ /**
+ * @since 15.0.0
+ */
public const INDEX_META = 4;
+
+ /**
+ * @since 15.0.0
+ */
public const INDEX_CONTENT = 8;
+
+ /**
+ * @since 16.0.0
+ */
public const INDEX_PARTS = 16;
+
+ /**
+ * @since 15.0.0
+ */
public const INDEX_FULL = 28;
+
+ /**
+ * @since 15.0.0
+ */
public const INDEX_REMOVE = 32;
+
+ /**
+ * @since 15.0.0
+ */
public const INDEX_DONE = 64;
+
+ /**
+ * @since 15.0.0
+ */
public const INDEX_FAILED = 128;
+ /**
+ * @since 15.0.0
+ */
public const ERROR_FAILED = 1;
+
+ /**
+ * @since 15.0.0
+ */
public const ERROR_FAILED2 = 2;
+
+ /**
+ * @since 15.0.0
+ */
public const ERROR_FAILED3 = 4;
+ /**
+ * @since 15.0.0
+ */
public const ERROR_SEV_1 = 1;
+
+ /**
+ * @since 15.0.0
+ */
public const ERROR_SEV_2 = 2;
+
+ /**
+ * @since 15.0.0
+ */
public const ERROR_SEV_3 = 3;
+
+ /**
+ * @since 15.0.0
+ */
public const ERROR_SEV_4 = 4;
diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php
index b659c2b33f1..ae93272d246 100644
--- a/lib/public/FullTextSearch/Model/IIndexDocument.php
+++ b/lib/public/FullTextSearch/Model/IIndexDocument.php
@@ -1,28 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -41,7 +22,14 @@ namespace OCP\FullTextSearch\Model;
* @since 15.0.0
*/
interface IIndexDocument {
+ /**
+ * @since 15.0.0
+ */
public const NOT_ENCODED = 0;
+
+ /**
+ * @since 15.0.0
+ */
public const ENCODED_BASE64 = 1;
diff --git a/lib/public/FullTextSearch/Model/IIndexOptions.php b/lib/public/FullTextSearch/Model/IIndexOptions.php
index f8ee10671e5..951da3b9a76 100644
--- a/lib/public/FullTextSearch/Model/IIndexOptions.php
+++ b/lib/public/FullTextSearch/Model/IIndexOptions.php
@@ -1,27 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -37,8 +19,6 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface IIndexOptions {
-
-
/**
* Get the value (as a string) for an option.
*
diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php
index c03126500cb..3ea7de43dd7 100644
--- a/lib/public/FullTextSearch/Model/IRunner.php
+++ b/lib/public/FullTextSearch/Model/IRunner.php
@@ -1,28 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -40,8 +21,19 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface IRunner {
+ /**
+ * @since 15.0.0
+ */
public const RESULT_TYPE_SUCCESS = 1;
+
+ /**
+ * @since 15.0.0
+ */
public const RESULT_TYPE_WARNING = 4;
+
+ /**
+ * @since 15.0.0
+ */
public const RESULT_TYPE_FAIL = 9;
diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php
index 7cfe07d9c3e..50e2cb5010a 100644
--- a/lib/public/FullTextSearch/Model/ISearchOption.php
+++ b/lib/public/FullTextSearch/Model/ISearchOption.php
@@ -1,28 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -33,8 +14,6 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface ISearchOption {
-
-
/**
* @since 16.0.0
*/
diff --git a/lib/public/FullTextSearch/Model/ISearchRequest.php b/lib/public/FullTextSearch/Model/ISearchRequest.php
index be93b2d9970..9dc9613c407 100644
--- a/lib/public/FullTextSearch/Model/ISearchRequest.php
+++ b/lib/public/FullTextSearch/Model/ISearchRequest.php
@@ -1,27 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -43,8 +25,6 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface ISearchRequest {
-
-
/**
* Get the maximum number of results to be returns by the Search Platform.
*
@@ -193,7 +173,7 @@ interface ISearchRequest {
*
* @return ISearchRequest
*/
- public function setMetaTags(array $tags): IsearchRequest;
+ public function setMetaTags(array $tags): ISearchRequest;
/**
diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
index 91f3c6dfe1b..3a6217398b6 100644
--- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
+++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
@@ -1,28 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -38,16 +19,59 @@ namespace OCP\FullTextSearch\Model;
*
*/
interface ISearchRequestSimpleQuery {
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_TEXT = 1;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_KEYWORD = 2;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_INT_EQ = 3;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_INT_GTE = 4;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_INT_GT = 5;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_INT_LTE = 6;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_INT_LT = 7;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_BOOL = 8;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_ARRAY = 9;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_REGEX = 10;
+
+ /**
+ * @since 17.0.0
+ */
public const COMPARE_TYPE_WILDCARD = 11;
diff --git a/lib/public/FullTextSearch/Model/ISearchResult.php b/lib/public/FullTextSearch/Model/ISearchResult.php
index 729f79da762..cf902835a4c 100644
--- a/lib/public/FullTextSearch/Model/ISearchResult.php
+++ b/lib/public/FullTextSearch/Model/ISearchResult.php
@@ -1,27 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -38,7 +20,7 @@ use OCP\FullTextSearch\IFullTextSearchProvider;
* search and fill the SearchResult object with results.
*
* Then, the object will be passed to the targeted Content Provider that will
- * improve the Search Results with detailed informations.
+ * improve the Search Results with detailed information.
*
* Finally, the SearchResult is returned to the original search request.
*
@@ -46,8 +28,6 @@ use OCP\FullTextSearch\IFullTextSearchProvider;
*
*/
interface ISearchResult {
-
-
/**
* Get the original SearchRequest.
*
diff --git a/lib/public/FullTextSearch/Model/ISearchTemplate.php b/lib/public/FullTextSearch/Model/ISearchTemplate.php
index adeccd4224c..89f683ca013 100644
--- a/lib/public/FullTextSearch/Model/ISearchTemplate.php
+++ b/lib/public/FullTextSearch/Model/ISearchTemplate.php
@@ -1,27 +1,9 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright 2018
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\FullTextSearch\Model;
@@ -34,7 +16,7 @@ use OCP\FullTextSearch\IFullTextSearchProvider;
* when the getSearchTemplate() method is called.
*
* The object will contain templates to be displayed, and the list of the different
- * options to be available to the user when he start a new search.
+ * options to be available to the user when they start a new search.
*
* The display of the Options is generated by the FullTextSearch app and Options
* can be displayed in 2 places:
@@ -52,8 +34,6 @@ use OCP\FullTextSearch\IFullTextSearchProvider;
*
*/
interface ISearchTemplate {
-
-
/**
* Set the class of the icon to be displayed in the left panel of the
* FullTextSearch navigation page, in front of the related Content Provider.