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.php22
-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.php22
-rw-r--r--lib/public/FullTextSearch/Model/IRunner.php34
-rw-r--r--lib/public/FullTextSearch/Model/ISearchOption.php23
-rw-r--r--lib/public/FullTextSearch/Model/ISearchRequest.php22
-rw-r--r--lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php66
-rw-r--r--lib/public/FullTextSearch/Model/ISearchResult.php22
-rw-r--r--lib/public/FullTextSearch/Model/ISearchTemplate.php24
10 files changed, 142 insertions, 206 deletions
diff --git a/lib/public/FullTextSearch/Model/IDocumentAccess.php b/lib/public/FullTextSearch/Model/IDocumentAccess.php
index 08d600849a5..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;
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 9f66496703d..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;
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 fbea54977da..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;
diff --git a/lib/public/FullTextSearch/Model/ISearchRequest.php b/lib/public/FullTextSearch/Model/ISearchRequest.php
index 5eaac6557c7..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;
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 2d78a1e4a89..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;
diff --git a/lib/public/FullTextSearch/Model/ISearchTemplate.php b/lib/public/FullTextSearch/Model/ISearchTemplate.php
index c7e946761bb..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: