diff options
82 files changed, 704 insertions, 685 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b60f29e..db1ab70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,21 @@ # Changelog +### v0.4.0 + +- fullnextsearch -> fulltextsearch +- Pagination +- settings panel + + + ### v0.3.2 - UI: remove personal settings - DB: fill err field on new indexes + + ### v0.3.1 - bugfixes. @@ -1,4 +1,4 @@ -app_name=fullnextsearch +app_name=fulltextsearch project_dir=$(CURDIR)/../$(app_name) build_dir=$(CURDIR)/build/artifacts @@ -8,7 +8,7 @@ sign_dir=$(build_dir)/sign package_name=$(app_name) cert_dir=$(HOME)/.nextcloud/certificates codecov_token_dir=$(HOME)/.nextcloud/codecov_token -version+=0.3.2 +version+=0.4.0 all: appstore @@ -1,10 +1,10 @@ -# FullNextSearch +# FullTextSearch -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nextcloud/fullnextsearch/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nextcloud/fullnextsearch/?b=master) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nextcloud/fulltextsearch/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nextcloud/fulltextsearch/?b=master) **BETA VERSION** -_FullNextSearch_ is the core App of a full-text search framework for your Nextcloud. +_FullTextSearch_ is the core App of a full-text search framework for your Nextcloud. To have it operate, and get content indexed, some other Apps are needed: - Some **Providers Apps** to extract content from your Nextcloud. @@ -15,5 +15,5 @@ _Note: There is no limit to the number of Platform-App to be installed, however ### Documentation -[Can be found on the Wiki](https://github.com/nextcloud/fullnextsearch/wiki) +[Can be found on the Wiki](https://github.com/nextcloud/fulltextsearch/wiki) diff --git a/appinfo/app.php b/appinfo/app.php index c59124a..a6a971e 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\AppInfo; +namespace OCA\FullTextSearch\AppInfo; use OCP\AppFramework\QueryException; diff --git a/appinfo/database.xml b/appinfo/database.xml index 67cad02..2e18279 100644 --- a/appinfo/database.xml +++ b/appinfo/database.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- - ~ FullNextSearch - Full Text Search your Nextcloud. + ~ FullTextSearch - Full text search framework for Nextcloud ~ ~ This file is licensed under the Affero General Public License version 3 or ~ later. See the COPYING file. ~ ~ @author Maxence Lange <maxence@artificial-owl.com> - ~ @copyright 2017 + ~ @copyright 2018 ~ @license GNU AGPL version 3 or any later version ~ ~ This program is free software: you can redistribute it and/or modify @@ -33,7 +33,7 @@ <charset>utf8</charset> <table> - <name>*dbprefix*fullnextsearch_indexes</name> + <name>*dbprefix*fulltextsearch_indexes</name> <declaration> <field> @@ -94,7 +94,7 @@ </table> <table> - <name>*dbprefix*fullnextsearch_ticks</name> + <name>*dbprefix*fulltextsearch_ticks</name> <declaration> <field> diff --git a/appinfo/info.xml b/appinfo/info.xml index 88d3c5f..9ba561f 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,46 +1,46 @@ <?xml version="1.0"?> <info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> - <id>fullnextsearch</id> - <name>Full Next Search (BETA)</name> - <summary>Core App of the modular content indexer.</summary> + <id>fulltextsearch</id> + <name>Full text search (BETA)</name> + <summary>Core of the full-text search framework for Nextcloud</summary> <description><![CDATA[ -FullNextSearch is the core App of a full-text search framework for your Nextcloud. +Core App of the full-text search framework for your Nextcloud. ]]> </description> - <version>0.3.2</version> + <version>0.4.0</version> <licence>agpl</licence> <author>Maxence Lange</author> - <namespace>FullNextSearch</namespace> + <namespace>FullTextSearch</namespace> <documentation> - <admin>https://github.com/nextcloud/fullnextsearch/wiki</admin> + <admin>https://github.com/nextcloud/fulltextsearch/wiki</admin> </documentation> <category>tools</category> - <website>https://github.com/nextcloud/fullnextsearch</website> - <bugs>https://github.com/nextcloud/fullnextsearch/issues</bugs> - <repository>https://github.com/nextcloud/fullnextsearch.git</repository> - <screenshot>https://raw.githubusercontent.com/nextcloud/fullnextsearch/master/screenshots/0.3.0.png</screenshot> + <website>https://github.com/nextcloud/fulltextsearch</website> + <bugs>https://github.com/nextcloud/fulltextsearch/issues</bugs> + <repository>https://github.com/nextcloud/fulltextsearch.git</repository> + <screenshot>https://raw.githubusercontent.com/nextcloud/fulltextsearch/master/screenshots/0.3.0.png</screenshot> <dependencies> <nextcloud min-version="12" max-version="14"/> </dependencies> <background-jobs> - <job>OCA\FullNextSearch\Cron\Index</job> + <job>OCA\FullTextSearch\Cron\Index</job> </background-jobs> <commands> - <command>OCA\FullNextSearch\Command\Stop</command> - <command>OCA\FullNextSearch\Command\Index</command> - <command>OCA\FullNextSearch\Command\Live</command> - <command>OCA\FullNextSearch\Command\Reset</command> - <command>OCA\FullNextSearch\Command\Search</command> + <command>OCA\FullTextSearch\Command\Stop</command> + <command>OCA\FullTextSearch\Command\Index</command> + <command>OCA\FullTextSearch\Command\Live</command> + <command>OCA\FullTextSearch\Command\Reset</command> + <command>OCA\FullTextSearch\Command\Search</command> </commands> <settings> - <admin>OCA\FullNextSearch\Settings\Admin</admin> - <admin-section>OCA\FullNextSearch\Settings\AdminSection</admin-section> + <admin>OCA\FullTextSearch\Settings\Admin</admin> + <admin-section>OCA\FullTextSearch\Settings\AdminSection</admin-section> </settings> </info> diff --git a/appinfo/routes.php b/appinfo/routes.php index 014a616..89789f5 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,7 +22,6 @@ * 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/>. * - * */ return [ diff --git a/css/nextsearch.css b/css/fulltextsearch.css index 2b7ff6f..d4da377 100644 --- a/css/nextsearch.css +++ b/css/fulltextsearch.css @@ -100,11 +100,11 @@ } .icon-page-prev { - background-image: url('/apps/fullnextsearch/img/page-prev.svg'); + background-image: url('/apps/fulltextsearch/img/page-prev.svg'); } .icon-page-next { - background-image: url('/apps/fullnextsearch/img/page-next.svg'); + background-image: url('/apps/fulltextsearch/img/page-next.svg'); } .icon-page-next, .icon-page-prev { @@ -114,14 +114,14 @@ height: 16px; } -.icon-fullnextsearch, .icon-close-fullnextsearch { +.icon-fulltextsearch, .icon-close-fulltextsearch { position: absolute; right: 10px; top: 10px; cursor: pointer; } -.icon-more-fullnextsearch { +.icon-more-fulltextsearch { position: absolute; right: 40px; top: 10px; diff --git a/css/fullnextsearch.css b/css/navigate.css index b1cb132..b1cb132 100644 --- a/css/fullnextsearch.css +++ b/css/navigate.css diff --git a/img/fullnextsearch.svg b/img/fulltextsearch.svg index 0724ed2..0724ed2 100644 --- a/img/fullnextsearch.svg +++ b/img/fulltextsearch.svg diff --git a/img/fullnextsearch_black.svg b/img/fulltextsearch_black.svg index 28595aa..28595aa 100644 --- a/img/fullnextsearch_black.svg +++ b/img/fulltextsearch_black.svg diff --git a/js/admin.elements.js b/js/admin.elements.js index 777e255..884930f 100644 --- a/js/admin.elements.js +++ b/js/admin.elements.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,33 +21,32 @@ * 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/>. * - * */ /** global: OCA */ -/** global: fns_admin_settings */ +/** global: fts_admin_settings */ -var fns_admin_elements = { - fns_div: null, - fns_platforms: null, - fns_chunkSize: null, - fns_providers: null, +var fts_admin_elements = { + fts_div: null, + fts_platforms: null, + fts_chunkSize: null, + fts_providers: null, init: function () { - fns_admin_elements.fns_div = $('#fns'); - fns_admin_elements.fns_platforms = $('#fns_platforms'); - fns_admin_elements.fns_chunkSize = $('#fns_chunk_size'); + fts_admin_elements.fts_div = $('#fns'); + fts_admin_elements.fts_platforms = $('#fts_platforms'); + fts_admin_elements.fts_chunkSize = $('#fts_chunk_size'); - fns_admin_elements.fns_platforms.on('change', function () { - fns_admin_settings.tagSettingsAsNotSaved($(this)); - fns_admin_settings.saveSettings(); + fts_admin_elements.fts_platforms.on('change', function () { + fts_admin_settings.tagSettingsAsNotSaved($(this)); + fts_admin_settings.saveSettings(); }); - fns_admin_elements.fns_chunkSize.on('input', function () { - fns_admin_settings.tagSettingsAsNotSaved($(this)); + fts_admin_elements.fts_chunkSize.on('input', function () { + fts_admin_settings.tagSettingsAsNotSaved($(this)); }).blur(function () { - fns_admin_settings.saveSettings(); + fts_admin_settings.saveSettings(); }); } }; diff --git a/js/admin.js b/js/admin.js index 611d3d7..4e86549 100644 --- a/js/admin.js +++ b/js/admin.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,12 +21,11 @@ * 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/>. * - * */ /** global: OCA */ -/** global: fns_admin_settings */ -/** global: fns_admin_elements */ +/** global: fts_admin_settings */ +/** global: fts_admin_elements */ @@ -34,17 +33,17 @@ $(document).ready(function () { /** - * @constructs NextSearchAdmin + * @constructs FullTextSearchAdmin */ - var NextSearchAdmin = function () { - $.extend(NextSearchAdmin.prototype, fns_admin_elements); - $.extend(NextSearchAdmin.prototype, fns_admin_settings); + var FullTextSearchAdmin = function () { + $.extend(FullTextSearchAdmin.prototype, fts_admin_elements); + $.extend(FullTextSearchAdmin.prototype, fts_admin_settings); - fns_admin_elements.init(); - fns_admin_settings.refreshSettingPage(); + fts_admin_elements.init(); + fts_admin_settings.refreshSettingPage(); }; - OCA.NextSearchAdmin = NextSearchAdmin; - OCA.NextSearchAdmin.settings = new NextSearchAdmin(); + OCA.FullTextSearchAdmin = FullTextSearchAdmin; + OCA.FullTextSearchAdmin.settings = new FullTextSearchAdmin(); }); diff --git a/js/admin.settings.js b/js/admin.settings.js index 11e83d0..5870572 100644 --- a/js/admin.settings.js +++ b/js/admin.settings.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -24,7 +24,7 @@ */ /** global: OC */ -/** global: fns_admin_elements */ +/** global: fts_admin_elements */ /** @namespace result.index_chunk */ /** @namespace result.platforms_all */ @@ -34,7 +34,7 @@ -var fns_admin_settings = { +var fts_admin_settings = { config: null, @@ -42,9 +42,9 @@ var fns_admin_settings = { $.ajax({ method: 'GET', - url: OC.generateUrl('/apps/fullnextsearch/admin/settings') + url: OC.generateUrl('/apps/fulltextsearch/admin/settings') }).done(function (res) { - fns_admin_settings.updateSettingPage(res); + fts_admin_settings.updateSettingPage(res); }); }, @@ -52,19 +52,19 @@ var fns_admin_settings = { updateSettingPage: function (result) { - fns_admin_settings.updateSettingPagePlatforms(result); - fns_admin_settings.updateSettingPageChunkSize(result); + fts_admin_settings.updateSettingPagePlatforms(result); + fts_admin_settings.updateSettingPageChunkSize(result); - fns_admin_settings.updateCurrentPlatform(result); - fns_admin_settings.updateEnabledProviders(result); + fts_admin_settings.updateCurrentPlatform(result); + fts_admin_settings.updateEnabledProviders(result); - fns_admin_settings.tagSettingsAsSaved(fns_admin_elements.fns_div); + fts_admin_settings.tagSettingsAsSaved(fts_admin_elements.fts_div); }, updateSettingPagePlatforms: function (result) { - fns_admin_elements.fns_platforms.empty(); - fns_admin_elements.fns_platforms.append($('<option>', { + fts_admin_elements.fts_platforms.empty(); + fts_admin_elements.fts_platforms.append($('<option>', { value: '', text: '' })); @@ -73,7 +73,7 @@ var fns_admin_settings = { var classes = Object.keys(platforms); for (var i = 0; i < classes.length; i++) { var platformClass = classes[i]; - fns_admin_elements.fns_platforms.append($('<option>', { + fts_admin_elements.fts_platforms.append($('<option>', { value: platformClass, selected: (result.search_platform === platformClass), text: platforms[platformClass].name @@ -83,13 +83,13 @@ var fns_admin_settings = { }); } - fns_admin_elements.fns_platforms.fadeTo(300, 1); + fts_admin_elements.fts_platforms.fadeTo(300, 1); }, updateSettingPageChunkSize: function (result) { - fns_admin_elements.fns_chunkSize.val(result.index_chunk); - fns_admin_elements.fns_chunkSize.fadeTo(300, 1); + fts_admin_elements.fts_chunkSize.val(result.index_chunk); + fts_admin_elements.fts_chunkSize.fadeTo(300, 1); }, @@ -138,18 +138,18 @@ var fns_admin_settings = { saveSettings: function () { var data = { - search_platform: fns_admin_elements.fns_platforms.val(), - index_chunk: fns_admin_elements.fns_chunkSize.val() + search_platform: fts_admin_elements.fts_platforms.val(), + index_chunk: fts_admin_elements.fts_chunkSize.val() }; $.ajax({ method: 'POST', - url: OC.generateUrl('/apps/fullnextsearch/admin/settings'), + url: OC.generateUrl('/apps/fulltextsearch/admin/settings'), data: { data: data } }).done(function (res) { - fns_admin_settings.updateSettingPage(res); + fts_admin_settings.updateSettingPage(res); }); } diff --git a/js/nextsearch.v1.api.js b/js/fulltextsearch.v1.api.js index ece1a83..1cc826e 100644 --- a/js/nextsearch.v1.api.js +++ b/js/fulltextsearch.v1.api.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,12 +21,11 @@ * 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/>. * - * */ /** global: OC */ -/** global: next_settings */ +/** global: settings */ /** global: result */ /** global: search */ /** global: nav */ @@ -40,7 +39,7 @@ var api = { $.ajax({ method: 'GET', - url: OC.generateUrl('/apps/fullnextsearch/v1/search'), + url: OC.generateUrl('/apps/fulltextsearch/v1/search'), data: { request: JSON.stringify(request) } @@ -60,7 +59,7 @@ var api = { $.ajax({ method: 'GET', - url: OC.generateUrl('/apps/fullnextsearch/options/' + providerId) + url: OC.generateUrl('/apps/fulltextsearch/options/' + providerId) }).done(function (res) { searchbar.onOptionsLoaded(res); api.onCallback(callback, res); diff --git a/js/nextsearch.v1.js b/js/fulltextsearch.v1.js index 5c742c9..d956088 100644 --- a/js/nextsearch.v1.js +++ b/js/fulltextsearch.v1.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,11 +21,10 @@ * 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/>. * - * */ /** global: OCA */ -/** global: next_settings */ +/** global: settings */ /** global: searchbar */ /** global: result */ /** global: nav */ @@ -35,20 +34,20 @@ (function () { /** - * @constructs NextSearch + * @constructs FullTextSearch */ - var NextSearch = function () { - $.extend(NextSearch.prototype, next_settings); - $.extend(NextSearch.prototype, result); - $.extend(NextSearch.prototype, searchbar); - $.extend(NextSearch.prototype, nav); - $.extend(NextSearch.prototype, api); + var FullTextSearch = function () { + $.extend(FullTextSearch.prototype, settings); + $.extend(FullTextSearch.prototype, result); + $.extend(FullTextSearch.prototype, searchbar); + $.extend(FullTextSearch.prototype, nav); + $.extend(FullTextSearch.prototype, api); - next_settings.generateDefaultTemplate(); - next_settings.generateNoResultDiv(); + settings.generateDefaultTemplate(); + settings.generateNoResultDiv(); }; - OCA.NextSearch = NextSearch; - OCA.NextSearch.api = new NextSearch(); + OCA.FullTextSearch = FullTextSearch; + OCA.FullTextSearch.api = new FullTextSearch(); })(); diff --git a/js/nextsearch.v1.navigation.js b/js/fulltextsearch.v1.navigation.js index 71e2d45..98a3284 100644 --- a/js/nextsearch.v1.navigation.js +++ b/js/fulltextsearch.v1.navigation.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,14 +21,13 @@ * 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/>. * - * */ /** global: OCA */ /** global: api */ /** global: search */ /** global: result */ -/** global: next_settings */ +/** global: settings */ @@ -119,8 +118,8 @@ var nav = { precItem.after(divResult); } - divResult.slideDown(next_settings.delay_result, function () { - $(this).children('.result_template').fadeTo(next_settings.delay_result, 1); + divResult.slideDown(settings.delay_result, function () { + $(this).children('.result_template').fadeTo(settings.delay_result, 1); }); precItem = divResult; @@ -134,8 +133,8 @@ var nav = { var entry = oldResult[i]; if (result.getResultIndex(entry.id, newResult) === -1) { var divResult = nav.getDivResult(entry.id, divProviderResult); - divResult.fadeTo(next_settings.delay_result, 0, function () { - $(this).slideUp(next_settings.delay_result, function () { + divResult.fadeTo(settings.delay_result, 0, function () { + $(this).slideUp(settings.delay_result, function () { $(this).remove(); }); }); @@ -168,12 +167,12 @@ var nav = { var divResult = nav.getDivResult(entryId, divProviderResult); if (precId === '') { - divResult.fadeTo(next_settings.delay_result, 0.35, function () { + divResult.fadeTo(settings.delay_result, 0.35, function () { $(this).prependTo(divProviderResult).fadeTo(100, 1); }); } else { var precItem = nav.getDivResult(precId, divProviderResult); - divResult.fadeTo(next_settings.delay_result, 0.35, function () { + divResult.fadeTo(settings.delay_result, 0.35, function () { $(this).insertAfter(precItem).fadeTo(100, 1); }); } @@ -183,7 +182,7 @@ var nav = { getDivProvider: function (providerId, providerName) { var ret = null; - next_settings.resultContainer.children('.provider_header').each(function () { + settings.resultContainer.children('.provider_header').each(function () { if ($(this).attr('data-id') === providerId) { ret = $(this); } @@ -191,7 +190,7 @@ var nav = { if (ret === null) { ret = nav.generateDivProvider(providerId, providerName); - next_settings.resultContainer.append(ret); + settings.resultContainer.append(ret); } return ret; @@ -250,20 +249,20 @@ var nav = { nav.deleteEmptyDiv(divResult, '#line1'); nav.deleteEmptyDiv(divResult, '#line2'); - if (next_settings.parentHasMethod('onEntryGenerated')) { - next_settings.parent.onEntryGenerated(divResult); + if (settings.parentHasMethod('onEntryGenerated')) { + settings.parent.onEntryGenerated(divResult); } }, onSearchReset: function () { - if (next_settings.parentHasMethod('onSearchReset')) { - next_settings.parent.onSearchReset(); + if (settings.parentHasMethod('onSearchReset')) { + settings.parent.onSearchReset(); } }, onResultDisplayed: function () { - if (next_settings.parentHasMethod('onResultDisplayed')) { - next_settings.parent.onResultDisplayed(); + if (settings.parentHasMethod('onResultDisplayed')) { + settings.parent.onResultDisplayed(); } }, @@ -276,13 +275,13 @@ var nav = { generateTemplateEntry: function (document) { - var divTemplate = next_settings.entryTemplate; + var divTemplate = settings.entryTemplate; if (divTemplate === null) { - divTemplate = next_settings.entryTemplateDefault; + divTemplate = settings.entryTemplateDefault; } if (!divTemplate.length) { - console.log('FullNextSearch Error: template_entry is not defined'); + console.log('FullTextSearch Error: template_entry is not defined'); return; } @@ -320,7 +319,7 @@ var nav = { var divProviderPagination = $('<div>', {class: 'provider_navigation_right'}); var divProviderPaginationPrev = $('<div>', {class: 'icon-page-prev provider_navigation_prev'}); divProviderPaginationPrev.on('click', function () { - nextSearch.search({ + fullTextSearch.search({ providers: providerId, search: divProviderNavigation.attr('data-search'), page: Number(divProviderNavigation.attr('data-page')) - 1, @@ -333,7 +332,7 @@ var nav = { var divProviderPaginationNext = $('<div>', {class: 'icon-page-next provider_navigation_next'}); divProviderPaginationNext.on('click', function () { - nextSearch.search({ + fullTextSearch.search({ providers: providerId, search: divProviderNavigation.attr('data-search'), page: Number(divProviderNavigation.attr('data-page')) + 1, diff --git a/js/nextsearch.v1.result.js b/js/fulltextsearch.v1.result.js index b4c0c6e..80a19f5 100644 --- a/js/nextsearch.v1.result.js +++ b/js/fulltextsearch.v1.result.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,11 +21,10 @@ * 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/>. * - * */ /** global: OCA */ -/** global: next_settings */ +/** global: settings */ /** global: curr */ /** global: nav */ @@ -35,7 +34,7 @@ var result = { displayResult: function (res) { - if (next_settings.resultContainer === null) { + if (settings.resultContainer === null) { return; } @@ -52,16 +51,16 @@ var result = { displayNoResult: function () { - next_settings.divNoResult.fadeTo(next_settings.delay_result, 1); - next_settings.resultContainer.find('.provider_header').each(function () { - $(this).fadeTo(next_settings.delay_result, 0); + settings.divNoResult.fadeTo(settings.delay_result, 1); + settings.resultContainer.find('.provider_header').each(function () { + $(this).fadeTo(settings.delay_result, 0); }); }, displayProviderResult: function (result) { - next_settings.divNoResult.fadeTo(next_settings.delay_result, 0); + settings.divNoResult.fadeTo(settings.delay_result, 0); var current = curr.getProviderResult(result.provider.id); var divProvider = nav.getDivProvider(result.provider.id, result.provider.name); @@ -70,8 +69,8 @@ var result = { nav.manageDivProviderResult(divProvider.children('.provider_result'), result.documents, current.documents); - divProvider.slideDown(next_settings.delay_provider, function () { - $(this).fadeTo(next_settings.delay_provider, 1); + divProvider.slideDown(settings.delay_provider, function () { + $(this).fadeTo(settings.delay_provider, 1); }); curr.setProviderResult(result.provider.id, result); diff --git a/js/nextsearch.v1.searchbar.js b/js/fulltextsearch.v1.searchbar.js index ab86eeb..641ab95 100644 --- a/js/nextsearch.v1.searchbar.js +++ b/js/fulltextsearch.v1.searchbar.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,7 +21,6 @@ * 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/>. * - * */ /** global: OCA */ @@ -30,8 +29,8 @@ /** global: api */ /** global: search */ /** global: result */ -/** global: nextSearch */ -/** global: next_settings */ +/** global: fullTextSearch */ +/** global: settings */ var searchbox = { @@ -53,9 +52,9 @@ var searchbar = { searchbox.search_div = $('<div>', {class: 'next_search_div'}); divHeaderRight.prepend(searchbox.search_div); - searchbox.search_icon = $('<div>', {class: 'icon-fullnextsearch'}); + searchbox.search_icon = $('<div>', {class: 'icon-fulltextsearch'}); searchbox.search_icon.css('background-image', - "url('/apps/fullnextsearch/img/fullnextsearch.svg')"); + "url('/apps/fulltextsearch/img/fulltextsearch.svg')"); searchbox.search_icon.fadeTo(0, 0.7); searchbox.search_div.append(searchbox.search_icon); @@ -71,7 +70,7 @@ var searchbar = { searchbox.search_more = $('<div>', {class: 'search_more'}); searchbox.search_more.fadeTo(0, 0); - searchbox.search_icon_more = $('<div>', {class: 'icon-more-white icon-more-fullnextsearch'}); + searchbox.search_icon_more = $('<div>', {class: 'icon-more-white icon-more-fulltextsearch'}); searchbox.search_icon_more.fadeTo(0, 0); searchbox.search_icon_more.on('click', function () { if (curr.moreDisplayed) { @@ -84,10 +83,10 @@ var searchbar = { }); searchbox.search_form.append(searchbox.search_icon_more); - searchbox.search_icon_close = $('<div>', {class: 'icon-close-white icon-close-fullnextsearch'}); + searchbox.search_icon_close = $('<div>', {class: 'icon-close-white icon-close-fulltextsearch'}); searchbox.search_icon_close.fadeTo(0, 0); searchbox.search_icon_close.on('click', function () { - next_settings.lockSearchbox = false; + settings.lockSearchbox = false; searchbox.search_icon_more.stop().fadeTo(100, 0); searchbox.search_icon_close.stop().fadeTo(100, 0); searchbox.search_more.stop().fadeTo(100, 0); @@ -101,7 +100,7 @@ var searchbar = { searchbox.search_icon.stop().fadeTo(100, 0); searchbox.search_form.stop().fadeTo(100, 0.8); }, function () { - if (next_settings.lockSearchbox === true) { + if (settings.lockSearchbox === true) { return; } searchbox.search_form.stop().fadeTo(500, 0); @@ -111,7 +110,7 @@ var searchbar = { searchbox.search_div.append(searchbox.search_more); searchbox.search_input.on('focus', function () { - next_settings.lockSearchbox = true; + settings.lockSearchbox = true; searchbox.search_icon_more.stop().fadeTo(200, 1); searchbox.search_icon_close.stop().fadeTo(200, 1); }); @@ -122,8 +121,8 @@ var searchbar = { nav.onSearchReset(); } - if (next_settings.parentHasMethod('onEntryGenerated')) { - next_settings.parent.onEntryGenerated(); + if (settings.parentHasMethod('onEntryGenerated')) { + settings.parent.onEntryGenerated(); } if (searchbox.searchTimeout === null && searchbar.initSearch(false)) { @@ -134,17 +133,17 @@ var searchbar = { } }); - nextSearch.options(next_settings.searchProviderId); + fullTextSearch.options(settings.searchProviderId); }, onOptionsLoaded: function (result) { - searchbox.search_more.html(result[next_settings.searchProviderId]); + searchbox.search_more.html(result[settings.searchProviderId]); searchbox.search_more.find('INPUT').each(function () { $(this).on('change', function () { var search = searchbox.search_input.val(); - nextSearch.search({ - providers: next_settings.searchProviderId, + fullTextSearch.search({ + providers: settings.searchProviderId, search: search, page: curr.page, options: searchbar.getSearchOptions(), @@ -171,7 +170,7 @@ var searchbar = { }, - // TODO: do we really need this initSearch, or should we use the one from fullnextsearch.js !? + // TODO: do we really need this initSearch, or should we use the one from fulltextsearch.js !? initSearch: function (force) { var search = searchbox.search_input.val(); @@ -185,8 +184,8 @@ var searchbar = { curr.lastRequest = search; - nextSearch.search({ - providers: next_settings.searchProviderId, + fullTextSearch.search({ + providers: settings.searchProviderId, search: search, page: curr.page, options: searchbar.getSearchOptions(), diff --git a/js/nextsearch.v1.settings.js b/js/fulltextsearch.v1.settings.js index 71e715f..7baa168 100644 --- a/js/nextsearch.v1.settings.js +++ b/js/fulltextsearch.v1.settings.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,13 +21,12 @@ * 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/>. * - * */ /** global: searchbar */ /** global: api */ -var next_settings = { +var settings = { parent: null, delay_provider: 300, @@ -54,7 +53,7 @@ var next_settings = { div.append(divLeft); div.append(divRight); - next_settings.entryTemplateDefault = $('<div>').append(div); + settings.entryTemplateDefault = $('<div>').append(div); }, @@ -62,29 +61,29 @@ var next_settings = { var div = $('<div>', {id: 'noresult'}); div.html('no result'); div.hide(); - next_settings.divNoResult = div; + settings.divNoResult = div; }, setEntryTemplateId: function (template, parent) { - next_settings.entryTemplate = template; - next_settings.parent = parent; + settings.entryTemplate = template; + settings.parent = parent; }, setResultContainerId: function (container) { - next_settings.resultContainer = container; - next_settings.resultContainer.prepend(next_settings.divNoResult); + settings.resultContainer = container; + settings.resultContainer.prepend(settings.divNoResult); }, addSearchBar: function (providerId) { - next_settings.searchProviderId = providerId; + settings.searchProviderId = providerId; searchbar.init(); }, parentHasMethod: function (method) { - if (next_settings.parent === null) { + if (settings.parent === null) { return false; } - return (typeof eval('next_settings.parent. ' + method) === "function"); + return (typeof eval('settings.parent. ' + method) === "function"); } }; diff --git a/js/fullnextsearch.js b/js/navigate.js index 8b2966c..e800338 100644 --- a/js/fullnextsearch.js +++ b/js/navigate.js @@ -1,11 +1,11 @@ /* - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,14 +21,13 @@ * 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/>. * - * */ /** global: OCA */ /** global: _ */ -const nextSearch = OCA.NextSearch.api; +const fullTextSearch = OCA.FullTextSearch.api; var elements = { @@ -48,8 +47,8 @@ Navigate.prototype = { init: function () { var self = this; - nextSearch.setEntryTemplateId($('#template_entry'), self); - nextSearch.setResultContainerId($('#search_result')); + fullTextSearch.setEntryTemplateId($('#template_entry'), self); + fullTextSearch.setResultContainerId($('#search_result')); elements.search_input = $('#search_input'); elements.search_submit = $('#search_submit'); @@ -86,7 +85,7 @@ Navigate.prototype = { page: curr.page }; - nextSearch.search(request, this.searchResult); + fullTextSearch.search(request, this.searchResult); return true; }, @@ -126,11 +125,11 @@ Navigate.prototype = { } }; -OCA.NextSearch.Example = Navigate; +OCA.FullTextSearch.Example = Navigate; $(document).ready(function () { - OCA.NextSearch.example = new Navigate(); + OCA.FullTextSearch.example = new Navigate(); }); diff --git a/js/personal.js b/js/personal.js deleted file mode 100644 index e69de29..0000000 --- a/js/personal.js +++ /dev/null diff --git a/lib/Api/v1/NextSearch.php b/lib/Api/v1/FullTextSearch.php index 71eefda..a40e4b4 100644 --- a/lib/Api/v1/NextSearch.php +++ b/lib/Api/v1/FullTextSearch.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,22 +22,21 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Api\v1; +namespace OCA\FullTextSearch\Api\v1; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Model\ExtendedIndex; -use OCA\FullNextSearch\Model\Index; -use OCA\FullNextSearch\Service\IndexService; -use OCA\FullNextSearch\Service\ProviderService; -use OCA\FullNextSearch\Service\SearchService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Model\ExtendedIndex; +use OCA\FullTextSearch\Model\Index; +use OCA\FullTextSearch\Service\IndexService; +use OCA\FullTextSearch\Service\ProviderService; +use OCA\FullTextSearch\Service\SearchService; use OCP\AppFramework\QueryException; use OCP\Util; -class NextSearch { +class FullTextSearch { const API_VERSION = [0, 1, 0]; @@ -59,7 +58,7 @@ class NextSearch { /** - * FullNextSearch::version(); + * FullTextSearch::version(); * * returns the current version of the API * @@ -74,13 +73,13 @@ class NextSearch { * */ public static function addJavascriptAPI() { - Util::addStyle(Application::APP_NAME, 'nextsearch'); - Util::addScript(Application::APP_NAME, 'nextsearch.v1.api'); - Util::addScript(Application::APP_NAME, 'nextsearch.v1.settings'); - Util::addScript(Application::APP_NAME, 'nextsearch.v1.searchbar'); - Util::addScript(Application::APP_NAME, 'nextsearch.v1.result'); - Util::addScript(Application::APP_NAME, 'nextsearch.v1.navigation'); - Util::addScript(Application::APP_NAME, 'nextsearch.v1'); + Util::addStyle(Application::APP_NAME, 'fulltextsearch'); + Util::addScript(Application::APP_NAME, 'fulltextsearch.v1.api'); + Util::addScript(Application::APP_NAME, 'fulltextsearch.v1.settings'); + Util::addScript(Application::APP_NAME, 'fulltextsearch.v1.searchbar'); + Util::addScript(Application::APP_NAME, 'fulltextsearch.v1.result'); + Util::addScript(Application::APP_NAME, 'fulltextsearch.v1.navigation'); + Util::addScript(Application::APP_NAME, 'fulltextsearch.v1'); } diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 04db022..1ca4e76 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,18 +22,18 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\AppInfo; +namespace OCA\FullTextSearch\AppInfo; -use OCA\FullNextSearch\Capabilities; -use OCA\FullNextSearch\Service\ConfigService; +use OCA\FullTextSearch\Capabilities; +use OCA\FullTextSearch\Service\ConfigService; use OCP\AppFramework\App; +use OCP\AppFramework\QueryException; class Application extends App { - const APP_NAME = 'fullnextsearch'; + const APP_NAME = 'fulltextsearch'; /** * @param array $params @@ -58,7 +58,7 @@ class Application extends App { /** * Register Navigation Tab * - * @throws \OCP\AppFramework\QueryException + * @throws QueryException */ public function registerNavigation() { @@ -71,20 +71,20 @@ class Application extends App { $this->getContainer() ->getServer() ->getNavigationManager() - ->add($this->fullNextSearchNavigation()); + ->add($this->fullTextSearchNavigation()); } - public function fullNextSearchNavigation() { + public function fullTextSearchNavigation() { $urlGen = \OC::$server->getURLGenerator(); $navName = \OC::$server->getL10N(self::APP_NAME) - ->t('Full Next Search'); + ->t('Full text search'); return [ 'id' => self::APP_NAME, 'order' => 5, - 'href' => $urlGen->linkToRoute('fullnextsearch.Navigation.navigate'), - 'icon' => $urlGen->imagePath(self::APP_NAME, 'fullnextsearch.svg'), + 'href' => $urlGen->linkToRoute('fulltextsearch.Navigation.navigate'), + 'icon' => $urlGen->imagePath(self::APP_NAME, 'fulltextsearch.svg'), 'name' => $navName ]; } diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 29c8807..dbfdd5e 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -1,17 +1,40 @@ <?php +/** + * FullTextSearch - Full text search framework for Nextcloud + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Maxence Lange <maxence@artificial-owl.com> + * @copyright 2018 + * @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/>. + * + */ - -namespace OCA\FullNextSearch; +namespace OCA\FullTextSearch; use Exception; -use OCA\FullNextSearch\Service\ProviderService; +use OCA\FullTextSearch\Service\ProviderService; use OCP\Capabilities\ICapability; /** * Class Capabilities * - * @package OCA\FullNextSearch + * @package OCA\FullTextSearch */ class Capabilities implements ICapability { @@ -34,7 +57,7 @@ class Capabilities implements ICapability { * Return this classes capabilities * * Result to be expected: - * {"fullnextsearch":{"remote":true,"providers":[{"id":"files","name":"Files"}]}} + * {"fulltextsearch":{"remote":true,"providers":[{"id":"files","name":"Files"}]}} * * if 'remote' is false, it means administrator does not allow search request with no CSRF check. * @@ -50,7 +73,7 @@ class Capabilities implements ICapability { $providers = $this->providerService->getConfiguredProviders(); return [ - 'fullnextsearch' => [ + 'fulltextsearch' => [ 'remote' => true, 'providers' => $this->providerService->serialize($providers) ] diff --git a/lib/Command/Index.php b/lib/Command/Index.php index 5e26822..2c2d62b 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,20 +22,19 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Command; +namespace OCA\FullTextSearch\Command; use Exception; -use OCA\FullNextSearch\INextSearchProvider; -use OCA\FullNextSearch\Model\ExtendedBase; -use OCA\FullNextSearch\Model\Runner; -use OCA\FullNextSearch\Service\IndexService; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\PlatformService; -use OCA\FullNextSearch\Service\ProviderService; -use OCA\FullNextSearch\Service\RunningService; +use OCA\FullTextSearch\IFullTextSearchProvider; +use OCA\FullTextSearch\Model\ExtendedBase; +use OCA\FullTextSearch\Model\Runner; +use OCA\FullTextSearch\Service\IndexService; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\PlatformService; +use OCA\FullTextSearch\Service\ProviderService; +use OCA\FullTextSearch\Service\RunningService; use OCP\IUserManager; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -95,7 +94,7 @@ class Index extends ExtendedBase { */ protected function configure() { parent::configure(); - $this->setName('fullnextsearch:index') + $this->setName('fulltextsearch:index') ->setDescription('Index files'); } @@ -130,11 +129,11 @@ class Index extends ExtendedBase { /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * * @throws Exception */ - private function indexProvider(INextSearchProvider $provider) { + private function indexProvider(IFullTextSearchProvider $provider) { $platform = $this->platformService->getPlatform(); $platform->initializeIndex($provider); $platform->setRunner($this->runner); diff --git a/lib/Command/Live.php b/lib/Command/Live.php index 76b1414..01c6f4c 100644 --- a/lib/Command/Live.php +++ b/lib/Command/Live.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,21 +22,20 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Command; +namespace OCA\FullTextSearch\Command; use Exception; -use OCA\FullNextSearch\Exceptions\InterruptException; -use OCA\FullNextSearch\Exceptions\TickDoesNotExistException; -use OCA\FullNextSearch\Model\ExtendedBase; -use OCA\FullNextSearch\Model\Runner; -use OCA\FullNextSearch\Service\IndexService; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\PlatformService; -use OCA\FullNextSearch\Service\ProviderService; -use OCA\FullNextSearch\Service\RunningService; +use OCA\FullTextSearch\Exceptions\InterruptException; +use OCA\FullTextSearch\Exceptions\TickDoesNotExistException; +use OCA\FullTextSearch\Model\ExtendedBase; +use OCA\FullTextSearch\Model\Runner; +use OCA\FullTextSearch\Service\IndexService; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\PlatformService; +use OCA\FullTextSearch\Service\ProviderService; +use OCA\FullTextSearch\Service\RunningService; use OCP\IUserManager; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -96,7 +95,7 @@ class Live extends ExtendedBase { */ protected function configure() { parent::configure(); - $this->setName('fullnextsearch:live') + $this->setName('fulltextsearch:live') ->setDescription('Index files'); } diff --git a/lib/Command/Reset.php b/lib/Command/Reset.php index ce895e9..92505dc 100644 --- a/lib/Command/Reset.php +++ b/lib/Command/Reset.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,17 +22,16 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Command; +namespace OCA\FullTextSearch\Command; use Exception; -use OCA\FullNextSearch\Model\ExtendedBase; -use OCA\FullNextSearch\Model\Runner; -use OCA\FullNextSearch\Service\IndexService; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\RunningService; +use OCA\FullTextSearch\Model\ExtendedBase; +use OCA\FullTextSearch\Model\Runner; +use OCA\FullTextSearch\Service\IndexService; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\RunningService; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -70,7 +69,7 @@ class Reset extends ExtendedBase { protected function configure() { parent::configure(); - $this->setName('fullnextsearch:reset') + $this->setName('fulltextsearch:reset') ->setDescription('reset index') ->addArgument('provider', InputArgument::OPTIONAL, 'provider'); } @@ -85,7 +84,6 @@ class Reset extends ExtendedBase { */ protected function execute(InputInterface $input, OutputInterface $output) { - try { $this->runner->sourceIsCommandLine($this, $output); $this->runner->start(); diff --git a/lib/Command/Search.php b/lib/Command/Search.php index ac99e6b..b3eab78 100644 --- a/lib/Command/Search.php +++ b/lib/Command/Search.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,18 +22,17 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Command; +namespace OCA\FullTextSearch\Command; use Exception; use OC\Core\Command\Base; -use OCA\FullNextSearch\Model\IndexDocument; -use OCA\FullNextSearch\Model\SearchRequest; -use OCA\FullNextSearch\Model\SearchResult; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\SearchService; +use OCA\FullTextSearch\Model\IndexDocument; +use OCA\FullTextSearch\Model\SearchRequest; +use OCA\FullTextSearch\Model\SearchResult; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\SearchService; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -66,7 +65,7 @@ class Search extends Base { protected function configure() { parent::configure(); - $this->setName('fullnextsearch:search') + $this->setName('fulltextsearch:search') ->setDescription('Search something') ->addArgument('user', InputArgument::OPTIONAL, 'user') ->addArgument('string', InputArgument::OPTIONAL, 'needle'); @@ -84,10 +83,15 @@ class Search extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('search'); - $request = SearchRequest::fromArray(['search' => $input->getArgument('string')]); + $request = SearchRequest::fromArray( + [ + 'providers' => 'all', + 'search' => $input->getArgument('string') + ] + ); try { - $result = $this->searchService->search('files', $input->getArgument('user'), $request); + $result = $this->searchService->search($input->getArgument('user'), $request); foreach ($result as $searchResult) { $this->displaySearchResult($searchResult); diff --git a/lib/Command/Stop.php b/lib/Command/Stop.php index 3dbda2c..63b039b 100644 --- a/lib/Command/Stop.php +++ b/lib/Command/Stop.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,14 +22,13 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Command; +namespace OCA\FullTextSearch\Command; -use OCA\FullNextSearch\Model\ExtendedBase; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\RunningService; +use OCA\FullTextSearch\Model\ExtendedBase; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\RunningService; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -59,7 +58,7 @@ class Stop extends ExtendedBase { protected function configure() { parent::configure(); - $this->setName('fullnextsearch:stop') + $this->setName('fulltextsearch:stop') ->setDescription('stop all indexing'); } diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 875b906..c123aff 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,16 +22,15 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Controller; +namespace OCA\FullTextSearch\Controller; use Exception; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Model\SearchRequest; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\SearchService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Model\SearchRequest; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\SearchService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; diff --git a/lib/Controller/NavigationController.php b/lib/Controller/NavigationController.php index ff3d64e..d18e600 100644 --- a/lib/Controller/NavigationController.php +++ b/lib/Controller/NavigationController.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,14 +22,13 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Controller; +namespace OCA\FullTextSearch\Controller; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 80d2631..52e6b72 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,16 +22,15 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Controller; +namespace OCA\FullTextSearch\Controller; use Exception; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\SettingsService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\SettingsService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; diff --git a/lib/Controller/TemplatesController.php b/lib/Controller/TemplatesController.php index f6d1d83..bef23e2 100644 --- a/lib/Controller/TemplatesController.php +++ b/lib/Controller/TemplatesController.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -24,15 +24,15 @@ * */ -namespace OCA\FullNextSearch\Controller; +namespace OCA\FullTextSearch\Controller; use Exception; use OC\AppFramework\Http; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Exceptions\ProviderDoesNotExistException; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\ProviderService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Exceptions\ProviderDoesNotExistException; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\ProviderService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/Cron/Index.php b/lib/Cron/Index.php index d9b9df7..b0c3d06 100644 --- a/lib/Cron/Index.php +++ b/lib/Cron/Index.php @@ -1,13 +1,13 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -23,24 +23,24 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Cron; +namespace OCA\FullTextSearch\Cron; use Exception; use OC\BackgroundJob\TimedJob; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Exceptions\InterruptException; -use OCA\FullNextSearch\Model\Runner; -use OCA\FullNextSearch\Service\IndexService; -use OCA\FullNextSearch\Service\MiscService; -use OCA\FullNextSearch\Service\PlatformService; -use OCA\FullNextSearch\Service\ProviderService; -use OCA\FullNextSearch\Service\RunningService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Exceptions\InterruptException; +use OCA\FullTextSearch\Model\Runner; +use OCA\FullTextSearch\Service\IndexService; +use OCA\FullTextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\PlatformService; +use OCA\FullTextSearch\Service\ProviderService; +use OCA\FullTextSearch\Service\RunningService; use OCP\AppFramework\QueryException; use OCP\IUserManager; + class Index extends TimedJob { /** @var IUserManager */ diff --git a/lib/Db/CoreRequestBuilder.php b/lib/Db/CoreRequestBuilder.php index b879bae..2eb3a26 100644 --- a/lib/Db/CoreRequestBuilder.php +++ b/lib/Db/CoreRequestBuilder.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,24 +22,23 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Db; +namespace OCA\FullTextSearch\Db; use Doctrine\DBAL\Query\QueryBuilder; -use OCA\FullNextSearch\Model\Index; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; +use OCA\FullTextSearch\Model\Index; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IL10N; class CoreRequestBuilder { - const TABLE_INDEXES = 'fullnextsearch_indexes'; - const TABLE_TICKS = 'fullnextsearch_ticks'; + const TABLE_INDEXES = 'fulltextsearch_indexes'; + const TABLE_TICKS = 'fulltextsearch_ticks'; /** @var IDBConnection */ protected $dbConnection; diff --git a/lib/Db/IndexesRequest.php b/lib/Db/IndexesRequest.php index c070dfa..a4a8dca 100644 --- a/lib/Db/IndexesRequest.php +++ b/lib/Db/IndexesRequest.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,16 +22,15 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Db; +namespace OCA\FullTextSearch\Db; -use OCA\FullNextSearch\Exceptions\IndexDoesNotExistException; -use OCA\FullNextSearch\INextSearchProvider; -use OCA\FullNextSearch\Model\ExtendedIndex; -use OCA\FullNextSearch\Model\Index; +use OCA\FullTextSearch\Exceptions\IndexDoesNotExistException; +use OCA\FullTextSearch\IFullTextSearchProvider; +use OCA\FullTextSearch\Model\ExtendedIndex; +use OCA\FullTextSearch\Model\Index; class IndexesRequest extends IndexesRequestBuilder { @@ -175,11 +174,11 @@ class IndexesRequest extends IndexesRequestBuilder { /** * return list of last indexes from a providerId. * - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * * @return Index[] */ - public function getIndexesFromProvider(INextSearchProvider $provider) { + public function getIndexesFromProvider(IFullTextSearchProvider $provider) { $qb = $this->getIndexesSelectSql(); $this->limitToProviderId($qb, $provider->getId()); diff --git a/lib/Db/IndexesRequestBuilder.php b/lib/Db/IndexesRequestBuilder.php index bd62f23..53d8b62 100644 --- a/lib/Db/IndexesRequestBuilder.php +++ b/lib/Db/IndexesRequestBuilder.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,15 +22,14 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Db; +namespace OCA\FullTextSearch\Db; -use OCA\FullNextSearch\Model\ExtendedIndex; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; +use OCA\FullTextSearch\Model\ExtendedIndex; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IL10N; diff --git a/lib/Db/TickRequest.php b/lib/Db/TickRequest.php index 3e4b589..ba6dfe5 100644 --- a/lib/Db/TickRequest.php +++ b/lib/Db/TickRequest.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,15 +22,14 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Db; +namespace OCA\FullTextSearch\Db; -use OCA\FullNextSearch\Exceptions\TickDoesNotExistException; -use OCA\FullNextSearch\Model\ExtendedTick; -use OCA\FullNextSearch\Model\Tick; +use OCA\FullTextSearch\Exceptions\TickDoesNotExistException; +use OCA\FullTextSearch\Model\ExtendedTick; +use OCA\FullTextSearch\Model\Tick; class TickRequest extends TickRequestBuilder { diff --git a/lib/Db/TickRequestBuilder.php b/lib/Db/TickRequestBuilder.php index ecf44e7..bbce090 100644 --- a/lib/Db/TickRequestBuilder.php +++ b/lib/Db/TickRequestBuilder.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,15 +22,14 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Db; +namespace OCA\FullTextSearch\Db; -use OCA\FullNextSearch\Model\ExtendedTick; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; +use OCA\FullTextSearch\Model\ExtendedTick; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IL10N; diff --git a/lib/Exceptions/DatabaseException.php b/lib/Exceptions/DatabaseException.php index e524f57..b285337 100644 --- a/lib/Exceptions/DatabaseException.php +++ b/lib/Exceptions/DatabaseException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class DatabaseException extends \Exception { diff --git a/lib/Exceptions/EmptySearchException.php b/lib/Exceptions/EmptySearchException.php index 98da469..cfec8d9 100644 --- a/lib/Exceptions/EmptySearchException.php +++ b/lib/Exceptions/EmptySearchException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class EmptySearchException extends \Exception { diff --git a/lib/Exceptions/IndexDoesNotExistException.php b/lib/Exceptions/IndexDoesNotExistException.php index fecb3cf..d113814 100644 --- a/lib/Exceptions/IndexDoesNotExistException.php +++ b/lib/Exceptions/IndexDoesNotExistException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class IndexDoesNotExistException extends \Exception { diff --git a/lib/Exceptions/InterruptException.php b/lib/Exceptions/InterruptException.php index cdd0353..6a6f680 100644 --- a/lib/Exceptions/InterruptException.php +++ b/lib/Exceptions/InterruptException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class InterruptException extends \Exception { diff --git a/lib/Exceptions/NoResultException.php b/lib/Exceptions/NoResultException.php index 8588ae9..5bcefd7 100644 --- a/lib/Exceptions/NoResultException.php +++ b/lib/Exceptions/NoResultException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class NoResultException extends \Exception { diff --git a/lib/Exceptions/PlatformDoesNotExistException.php b/lib/Exceptions/PlatformDoesNotExistException.php index c38277a..e69e03a 100644 --- a/lib/Exceptions/PlatformDoesNotExistException.php +++ b/lib/Exceptions/PlatformDoesNotExistException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class PlatformDoesNotExistException extends \Exception { diff --git a/lib/Exceptions/PlatformIsNotCompatibleException.php b/lib/Exceptions/PlatformIsNotCompatibleException.php index 79cff1e..ee7ebe2 100644 --- a/lib/Exceptions/PlatformIsNotCompatibleException.php +++ b/lib/Exceptions/PlatformIsNotCompatibleException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class PlatformIsNotCompatibleException extends \Exception { diff --git a/lib/Exceptions/PlatformMustBeSingleException.php b/lib/Exceptions/PlatformMustBeSingleException.php index 7e09e32..04b386e 100644 --- a/lib/Exceptions/PlatformMustBeSingleException.php +++ b/lib/Exceptions/PlatformMustBeSingleException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class PlatformMustBeSingleException extends \Exception { diff --git a/lib/Exceptions/PlatformNotDefinedException.php b/lib/Exceptions/PlatformNotDefinedException.php index f707e1d..2f8ff37 100644 --- a/lib/Exceptions/PlatformNotDefinedException.php +++ b/lib/Exceptions/PlatformNotDefinedException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class PlatformNotDefinedException extends \Exception { diff --git a/lib/Exceptions/PlatformNotSelectedException.php b/lib/Exceptions/PlatformNotSelectedException.php index 0217dc9..3c7025e 100644 --- a/lib/Exceptions/PlatformNotSelectedException.php +++ b/lib/Exceptions/PlatformNotSelectedException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class PlatformNotSelectedException extends \Exception { diff --git a/lib/Exceptions/ProviderDoesNotExistException.php b/lib/Exceptions/ProviderDoesNotExistException.php index b3c01dd..01f51a1 100644 --- a/lib/Exceptions/ProviderDoesNotExistException.php +++ b/lib/Exceptions/ProviderDoesNotExistException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class ProviderDoesNotExistException extends \Exception { diff --git a/lib/Exceptions/ProviderIsNotCompatibleException.php b/lib/Exceptions/ProviderIsNotCompatibleException.php index 7e3914b..b0d7cca 100644 --- a/lib/Exceptions/ProviderIsNotCompatibleException.php +++ b/lib/Exceptions/ProviderIsNotCompatibleException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class ProviderIsNotCompatibleException extends \Exception { diff --git a/lib/Exceptions/ProviderIsNotUniqueException.php b/lib/Exceptions/ProviderIsNotUniqueException.php index dd5d0fc..13a1032 100644 --- a/lib/Exceptions/ProviderIsNotUniqueException.php +++ b/lib/Exceptions/ProviderIsNotUniqueException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class ProviderIsNotUniqueException extends \Exception { diff --git a/lib/Exceptions/ProviderOptionsDoesNotExistException.php b/lib/Exceptions/ProviderOptionsDoesNotExistException.php index c3e96c6..305f311 100644 --- a/lib/Exceptions/ProviderOptionsDoesNotExistException.php +++ b/lib/Exceptions/ProviderOptionsDoesNotExistException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class ProviderOptionsDoesNotExistException extends \Exception { diff --git a/lib/Exceptions/RunnerAlreadyUpException.php b/lib/Exceptions/RunnerAlreadyUpException.php index 43710cd..4571740 100644 --- a/lib/Exceptions/RunnerAlreadyUpException.php +++ b/lib/Exceptions/RunnerAlreadyUpException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class RunnerAlreadyUpException extends \Exception { diff --git a/lib/Exceptions/TickDoesNotExistException.php b/lib/Exceptions/TickDoesNotExistException.php index 9eb259d..7edbc17 100644 --- a/lib/Exceptions/TickDoesNotExistException.php +++ b/lib/Exceptions/TickDoesNotExistException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class TickDoesNotExistException extends \Exception { diff --git a/lib/Exceptions/TickIsNotAliveException.php b/lib/Exceptions/TickIsNotAliveException.php index 4b96795..338a804 100644 --- a/lib/Exceptions/TickIsNotAliveException.php +++ b/lib/Exceptions/TickIsNotAliveException.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Exceptions; +namespace OCA\FullTextSearch\Exceptions; class TickIsNotAliveException extends \Exception { diff --git a/lib/INextSearchPlatform.php b/lib/IFullTextSearchPlatform.php index bb49ac2..98b2561 100644 --- a/lib/INextSearchPlatform.php +++ b/lib/IFullTextSearchPlatform.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,20 +22,19 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch; +namespace OCA\FullTextSearch; -use OCA\FullNextSearch\Model\DocumentAccess; -use OCA\FullNextSearch\Model\Index; -use OCA\FullNextSearch\Model\IndexDocument; -use OCA\FullNextSearch\Model\Runner; -use OCA\FullNextSearch\Model\SearchRequest; -use OCA\FullNextSearch\Model\SearchResult; +use OCA\FullTextSearch\Model\DocumentAccess; +use OCA\FullTextSearch\Model\Index; +use OCA\FullTextSearch\Model\IndexDocument; +use OCA\FullTextSearch\Model\Runner; +use OCA\FullTextSearch\Model\SearchRequest; +use OCA\FullTextSearch\Model\SearchResult; -interface INextSearchPlatform { +interface IFullTextSearchPlatform { /** * must returns a unique Id @@ -69,15 +68,15 @@ interface INextSearchPlatform { /** * Init an index regarding a provider * - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider */ - public function initializeIndex(INextSearchProvider $provider); + public function initializeIndex(IFullTextSearchProvider $provider); /** * Reset the indexes * - * @param INextSearchProvider|null $provider + * @param IFullTextSearchProvider|null $provider */ public function removeIndex($provider); @@ -86,30 +85,30 @@ interface INextSearchPlatform { * $command can be null. instanceof ExtendedBase if the method is called from CLI. * Use it to echo whatever and intercept ^C * - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * @param IndexDocument[] $documents * * @return Index[] */ - public function indexDocuments(INextSearchProvider $provider, $documents); + public function indexDocuments(IFullTextSearchProvider $provider, $documents); /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * @param IndexDocument $document * * @return Index */ - public function indexDocument(INextSearchProvider $provider, IndexDocument $document); + public function indexDocument(IFullTextSearchProvider $provider, IndexDocument $document); /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * @param DocumentAccess $access * @param SearchRequest $request * * @return SearchResult */ - public function searchDocuments(INextSearchProvider $provider, DocumentAccess $access, $request); + public function searchDocuments(IFullTextSearchProvider $provider, DocumentAccess $access, $request); }
\ No newline at end of file diff --git a/lib/INextSearchProvider.php b/lib/IFullTextSearchProvider.php index e195e4f..1c45be1 100644 --- a/lib/INextSearchProvider.php +++ b/lib/IFullTextSearchProvider.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,20 +21,19 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch; +namespace OCA\FullTextSearch; -use OCA\FullNextSearch\Model\Index; -use OCA\FullNextSearch\Model\IndexDocument; -use OCA\FullNextSearch\Model\Runner; -use OCA\FullNextSearch\Model\SearchRequest; -use OCA\FullNextSearch\Model\SearchResult; +use OCA\FullTextSearch\Model\Index; +use OCA\FullTextSearch\Model\IndexDocument; +use OCA\FullTextSearch\Model\Runner; +use OCA\FullTextSearch\Model\SearchRequest; +use OCA\FullTextSearch\Model\SearchResult; use OCP\AppFramework\Http\TemplateResponse; -interface INextSearchProvider { +interface IFullTextSearchProvider { /** @@ -111,32 +110,32 @@ interface INextSearchProvider { /** - * @param INextSearchPlatform $platform + * @param IFullTextSearchPlatform $platform */ - public function onInitializingIndex(INextSearchPlatform $platform); + public function onInitializingIndex(IFullTextSearchPlatform $platform); /** - * @param INextSearchPlatform $platform + * @param IFullTextSearchPlatform $platform * @param array $arr */ - public function onIndexingDocument(INextSearchPlatform $platform, &$arr); + public function onIndexingDocument(IFullTextSearchPlatform $platform, &$arr); /** - * @param INextSearchPlatform $platform + * @param IFullTextSearchPlatform $platform */ - public function onRemovingIndex(INextSearchPlatform $platform); + public function onRemovingIndex(IFullTextSearchPlatform $platform); /** - * @param INextSearchPlatform $platform + * @param IFullTextSearchPlatform $platform * @param SearchRequest $request * @param array $arr * * @return array */ - public function onSearchingQuery(INextSearchPlatform $platform, SearchRequest $request, &$arr); + public function onSearchingQuery(IFullTextSearchPlatform $platform, SearchRequest $request, &$arr); /** diff --git a/lib/Model/DocumentAccess.php b/lib/Model/DocumentAccess.php index c2b542a..7c61b53 100644 --- a/lib/Model/DocumentAccess.php +++ b/lib/Model/DocumentAccess.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class DocumentAccess implements \JsonSerializable { diff --git a/lib/Model/ExtendedBase.php b/lib/Model/ExtendedBase.php index 6f7f3da..2b5c25e 100644 --- a/lib/Model/ExtendedBase.php +++ b/lib/Model/ExtendedBase.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,14 +22,13 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; use OC\Core\Command\Base; -use OCA\FullNextSearch\Exceptions\InterruptException; +use OCA\FullTextSearch\Exceptions\InterruptException; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/Model/ExtendedIndex.php b/lib/Model/ExtendedIndex.php index 9dea110..a26377e 100644 --- a/lib/Model/ExtendedIndex.php +++ b/lib/Model/ExtendedIndex.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,12 +21,11 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class ExtendedIndex extends Index { diff --git a/lib/Model/ExtendedTick.php b/lib/Model/ExtendedTick.php index 806bdf9..8c70c6c 100644 --- a/lib/Model/ExtendedTick.php +++ b/lib/Model/ExtendedTick.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,11 +22,10 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class ExtendedTick extends Tick { diff --git a/lib/Model/Index.php b/lib/Model/Index.php index 4cf1b2c..c9525ca 100644 --- a/lib/Model/Index.php +++ b/lib/Model/Index.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class Index implements \JsonSerializable { diff --git a/lib/Model/IndexDocument.php b/lib/Model/IndexDocument.php index 01fabcb..5f27b76 100644 --- a/lib/Model/IndexDocument.php +++ b/lib/Model/IndexDocument.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,11 +21,10 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class IndexDocument implements \JsonSerializable { diff --git a/lib/Model/ProviderIndexes.php b/lib/Model/ProviderIndexes.php index dc838c2..8b747fc 100644 --- a/lib/Model/ProviderIndexes.php +++ b/lib/Model/ProviderIndexes.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,11 +22,10 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class ProviderIndexes { diff --git a/lib/Model/Runner.php b/lib/Model/Runner.php index cf6c15b..7dea51f 100644 --- a/lib/Model/Runner.php +++ b/lib/Model/Runner.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,19 +21,18 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; use Exception; -use OCA\FullNextSearch\Exceptions\InterruptException; -use OCA\FullNextSearch\Exceptions\RunnerAlreadyUpException; -use OCA\FullNextSearch\Exceptions\TickDoesNotExistException; -use OCA\FullNextSearch\Exceptions\TickIsNotAliveException; -use OCA\FullNextSearch\Service\RunningService; +use OCA\FullTextSearch\Exceptions\InterruptException; +use OCA\FullTextSearch\Exceptions\RunnerAlreadyUpException; +use OCA\FullTextSearch\Exceptions\TickDoesNotExistException; +use OCA\FullTextSearch\Exceptions\TickIsNotAliveException; +use OCA\FullTextSearch\Service\RunningService; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/Model/SearchRequest.php b/lib/Model/SearchRequest.php index 31a25a2..4c535eb 100644 --- a/lib/Model/SearchRequest.php +++ b/lib/Model/SearchRequest.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,12 +21,12 @@ * * 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/>. - * + * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; -use OCA\FullNextSearch\Service\MiscService; +use OCA\FullTextSearch\Service\MiscService; class SearchRequest implements \JsonSerializable { diff --git a/lib/Model/SearchResult.php b/lib/Model/SearchResult.php index 12ad75e..b364123 100644 --- a/lib/Model/SearchResult.php +++ b/lib/Model/SearchResult.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,12 +22,11 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; -use OCA\FullNextSearch\INextSearchProvider; +use OCA\FullTextSearch\IFullTextSearchProvider; class SearchResult implements \JsonSerializable { @@ -37,7 +36,7 @@ class SearchResult implements \JsonSerializable { /** @var string */ private $rawResult; - /** @var INextSearchProvider */ + /** @var IFullTextSearchProvider */ private $provider; /** @var int */ @@ -113,14 +112,14 @@ class SearchResult implements \JsonSerializable { /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider */ - public function setProvider(INextSearchProvider $provider) { + public function setProvider(IFullTextSearchProvider $provider) { $this->provider = $provider; } /** - * @return INextSearchProvider + * @return IFullTextSearchProvider */ public function getProvider() { return $this->provider; diff --git a/lib/Model/Tick.php b/lib/Model/Tick.php index 676e03f..865bb86 100644 --- a/lib/Model/Tick.php +++ b/lib/Model/Tick.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,11 +22,10 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Model; +namespace OCA\FullTextSearch\Model; class Tick { diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 5d7c80f..953b9dd 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,13 +22,12 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Exceptions\ProviderOptionsDoesNotExistException; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Exceptions\ProviderOptionsDoesNotExistException; use OCP\IConfig; use OCP\PreConditionNotMetException; use OCP\Util; diff --git a/lib/Service/IndexService.php b/lib/Service/IndexService.php index f27c3b7..e1d7c6e 100644 --- a/lib/Service/IndexService.php +++ b/lib/Service/IndexService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,26 +21,25 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; use Exception; -use OCA\FullNextSearch\Db\IndexesRequest; -use OCA\FullNextSearch\Exceptions\DatabaseException; -use OCA\FullNextSearch\Exceptions\IndexDoesNotExistException; -use OCA\FullNextSearch\Exceptions\InterruptException; -use OCA\FullNextSearch\Exceptions\NoResultException; -use OCA\FullNextSearch\Exceptions\TickDoesNotExistException; -use OCA\FullNextSearch\INextSearchPlatform; -use OCA\FullNextSearch\INextSearchProvider; -use OCA\FullNextSearch\Model\ExtendedIndex; -use OCA\FullNextSearch\Model\Index; -use OCA\FullNextSearch\Model\IndexDocument; -use OCA\FullNextSearch\Model\ProviderIndexes; -use OCA\FullNextSearch\Model\Runner; +use OCA\FullTextSearch\Db\IndexesRequest; +use OCA\FullTextSearch\Exceptions\DatabaseException; +use OCA\FullTextSearch\Exceptions\IndexDoesNotExistException; +use OCA\FullTextSearch\Exceptions\InterruptException; +use OCA\FullTextSearch\Exceptions\NoResultException; +use OCA\FullTextSearch\Exceptions\TickDoesNotExistException; +use OCA\FullTextSearch\IFullTextSearchPlatform; +use OCA\FullTextSearch\IFullTextSearchProvider; +use OCA\FullTextSearch\Model\ExtendedIndex; +use OCA\FullTextSearch\Model\Index; +use OCA\FullTextSearch\Model\IndexDocument; +use OCA\FullTextSearch\Model\ProviderIndexes; +use OCA\FullTextSearch\Model\Runner; class IndexService { @@ -108,14 +107,14 @@ class IndexService { /** - * @param INextSearchPlatform $platform - * @param INextSearchProvider $provider + * @param IFullTextSearchPlatform $platform + * @param IFullTextSearchProvider $provider * @param string $userId * * @throws Exception */ public function indexProviderContentFromUser( - INextSearchPlatform $platform, INextSearchProvider $provider, $userId + IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, $userId ) { $this->updateRunner('generateIndex' . $provider->getName()); $documents = $provider->generateIndexableDocuments($userId); @@ -128,14 +127,14 @@ class IndexService { /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * @param IndexDocument[] $items * * @return IndexDocument[] * @throws InterruptException * @throws TickDoesNotExistException */ - private function updateDocumentsWithCurrentIndex(INextSearchProvider $provider, array $items) { + private function updateDocumentsWithCurrentIndex(IFullTextSearchProvider $provider, array $items) { $currIndex = $this->getProviderIndexFromProvider($provider); $result = []; @@ -152,11 +151,11 @@ class IndexService { /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * * @return ProviderIndexes */ - private function getProviderIndexFromProvider(INextSearchProvider $provider) { + private function getProviderIndexFromProvider(IFullTextSearchProvider $provider) { $indexes = $this->indexesRequest->getIndexesFromProvider($provider); return new ProviderIndexes($indexes); @@ -164,13 +163,13 @@ class IndexService { /** - * @param INextSearchPlatform $platform - * @param INextSearchProvider $provider + * @param IFullTextSearchPlatform $platform + * @param IFullTextSearchProvider $provider * @param IndexDocument[] $documents * * @throws Exception */ - private function indexChunks(INextSearchPlatform $platform, INextSearchProvider $provider, $documents + private function indexChunks(IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, $documents ) { $chunkSize = $this->configService->getAppValue(ConfigService::CHUNK_INDEX); @@ -196,14 +195,14 @@ class IndexService { /** - * @param INextSearchPlatform $platform - * @param INextSearchProvider $provider + * @param IFullTextSearchPlatform $platform + * @param IFullTextSearchProvider $provider * @param IndexDocument[] $chunk * * @throws NoResultException * @throws DatabaseException */ - private function indexChunk(INextSearchPlatform $platform, INextSearchProvider $provider, $chunk) { + private function indexChunk(IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, $chunk) { if (sizeof($chunk) === 0) { throw new NoResultException(); } @@ -236,15 +235,15 @@ class IndexService { /** - * @param INextSearchPlatform $platform - * @param INextSearchProvider $provider + * @param IFullTextSearchPlatform $platform + * @param IFullTextSearchProvider $provider * @param Index $index * * @internal param int|string $documentId * @throws Exception */ public function updateDocument( - INextSearchPlatform $platform, INextSearchProvider $provider, Index $index + IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, Index $index ) { $document = $provider->updateDocument($index); if ($document === null) { diff --git a/lib/Service/MiscService.php b/lib/Service/MiscService.php index ff90746..9b35995 100644 --- a/lib/Service/MiscService.php +++ b/lib/Service/MiscService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,12 +22,11 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; -use OCA\FullNextSearch\AppInfo\Application; +use OCA\FullTextSearch\AppInfo\Application; use OCP\ILogger; class MiscService { diff --git a/lib/Service/PlatformService.php b/lib/Service/PlatformService.php index 14a32db..806f8bd 100644 --- a/lib/Service/PlatformService.php +++ b/lib/Service/PlatformService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,19 +21,18 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; use Exception; use OC\App\AppManager; use OC_App; -use OCA\FullNextSearch\Exceptions\PlatformDoesNotExistException; -use OCA\FullNextSearch\Exceptions\PlatformIsNotCompatibleException; -use OCA\FullNextSearch\Exceptions\PlatformNotSelectedException; -use OCA\FullNextSearch\INextSearchPlatform; +use OCA\FullTextSearch\Exceptions\PlatformDoesNotExistException; +use OCA\FullTextSearch\Exceptions\PlatformIsNotCompatibleException; +use OCA\FullTextSearch\Exceptions\PlatformNotSelectedException; +use OCA\FullTextSearch\IFullTextSearchPlatform; use OCP\AppFramework\QueryException; class PlatformService { @@ -50,7 +49,7 @@ class PlatformService { /** @var array */ private $platforms = []; - /** @var INextSearchPlatform */ + /** @var IFullTextSearchPlatform */ private $platform; /** @var bool */ @@ -78,7 +77,7 @@ class PlatformService { /** * @param bool $silent * - * @return INextSearchPlatform + * @return IFullTextSearchPlatform * @throws Exception */ public function getPlatform($silent = false) { @@ -96,7 +95,7 @@ class PlatformService { /** - * @return INextSearchPlatform[] + * @return IFullTextSearchPlatform[] * @throws Exception */ public function getPlatforms() { @@ -106,7 +105,7 @@ class PlatformService { foreach ($this->platforms as $class) { try { $platform = \OC::$server->query((string)$class); - if ($platform instanceof INextSearchPlatform) { + if ($platform instanceof IFullTextSearchPlatform) { $platforms[$class] = $platform; } } catch (QueryException $e) { @@ -158,9 +157,9 @@ class PlatformService { $selected = $this->getSelectedPlatform(); $platform = \OC::$server->query((string)$selected); - if (!($platform instanceof INextSearchPlatform)) { + if (!($platform instanceof IFullTextSearchPlatform)) { throw new PlatformIsNotCompatibleException( - $selected . ' is not a compatible NextSearchPlatform' + $selected . ' is not a compatible FullTextSearchPlatform' ); } @@ -178,12 +177,12 @@ class PlatformService { $selected = $this->configService->getAppValue(ConfigService::SEARCH_PLATFORM); if ($selected === '') { - throw new PlatformNotSelectedException('Admin have not selected any NextSearchPlatform'); + throw new PlatformNotSelectedException('Admin have not selected any FullTextSearchPlatform'); } if (!in_array($selected, $this->platforms)) { throw new PlatformDoesNotExistException( - 'NextSearchPlatform ' . $selected . ' is not available' + 'FullTextSearchPlatform ' . $selected . ' is not available' ); } @@ -195,12 +194,12 @@ class PlatformService { */ private function loadPlatformsFromApp($appId) { $appInfo = OC_App::getAppInfo($appId); - if (!is_array($appInfo) || !key_exists('fullnextsearch', $appInfo) - || !key_exists('platform', $appInfo['fullnextsearch'])) { + if (!is_array($appInfo) || !key_exists('fulltextsearch', $appInfo) + || !key_exists('platform', $appInfo['fulltextsearch'])) { return; } - $platforms = $appInfo['fullnextsearch']['platform']; + $platforms = $appInfo['fulltextsearch']['platform']; if (!is_array($platforms)) { $platforms = [$platforms]; } diff --git a/lib/Service/ProviderService.php b/lib/Service/ProviderService.php index f73f493..1378431 100644 --- a/lib/Service/ProviderService.php +++ b/lib/Service/ProviderService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,19 +22,18 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; use Exception; use OC\App\AppManager; use OC_App; -use OCA\FullNextSearch\Exceptions\ProviderDoesNotExistException; -use OCA\FullNextSearch\Exceptions\ProviderIsNotCompatibleException; -use OCA\FullNextSearch\Exceptions\ProviderIsNotUniqueException; -use OCA\FullNextSearch\Exceptions\ProviderOptionsDoesNotExistException; -use OCA\FullNextSearch\INextSearchProvider; +use OCA\FullTextSearch\Exceptions\ProviderDoesNotExistException; +use OCA\FullTextSearch\Exceptions\ProviderIsNotCompatibleException; +use OCA\FullTextSearch\Exceptions\ProviderIsNotUniqueException; +use OCA\FullTextSearch\Exceptions\ProviderOptionsDoesNotExistException; +use OCA\FullTextSearch\IFullTextSearchProvider; use OCP\AppFramework\QueryException; class ProviderService { @@ -48,7 +47,7 @@ class ProviderService { /** @var MiscService */ private $miscService; - /** @var INextSearchProvider[] */ + /** @var IFullTextSearchProvider[] */ private $providers = []; /** @var bool */ @@ -73,7 +72,7 @@ class ProviderService { /** - * Load all NextSearchProviders set in any info.xml file + * Load all FullTextSearchProviders set in any info.xml file * * @throws Exception */ @@ -105,9 +104,9 @@ class ProviderService { public function loadProvider($providerId) { $provider = \OC::$server->query((string)$providerId); - if (!($provider instanceof INextSearchProvider)) { + if (!($provider instanceof IFullTextSearchProvider)) { throw new ProviderIsNotCompatibleException( - $providerId . ' is not a compatible NextSearchProvider' + $providerId . ' is not a compatible FullTextSearchProvider' ); } @@ -119,7 +118,7 @@ class ProviderService { /** - * @return INextSearchProvider[] + * @return IFullTextSearchProvider[] * @throws Exception */ public function getProviders() { @@ -129,7 +128,7 @@ class ProviderService { } /** - * @return INextSearchProvider[] + * @return IFullTextSearchProvider[] * @throws Exception */ public function getConfiguredProviders() { @@ -149,7 +148,7 @@ class ProviderService { /** * @param array $providerList * - * @return INextSearchProvider[] + * @return IFullTextSearchProvider[] * @throws Exception * @throws ProviderDoesNotExistException */ @@ -175,7 +174,7 @@ class ProviderService { /** * @param string $providerId * - * @return INextSearchProvider + * @return IFullTextSearchProvider * @throws Exception * @throws ProviderDoesNotExistException */ @@ -215,7 +214,7 @@ class ProviderService { } - public function setProviderAsIndexed(INextSearchProvider $provider, $boolean) { + public function setProviderAsIndexed(IFullTextSearchProvider $provider, $boolean) { $this->configService->setProviderOptions( $provider->getId(), ConfigService::PROVIDER_INDEXED, (($boolean) ? '1' : '0') ); @@ -236,12 +235,12 @@ class ProviderService { */ private function loadProvidersFromApp($appId) { $appInfo = OC_App::getAppInfo($appId); - if (!is_array($appInfo) || !key_exists('fullnextsearch', $appInfo) - || !key_exists('provider', $appInfo['fullnextsearch'])) { + if (!is_array($appInfo) || !key_exists('fulltextsearch', $appInfo) + || !key_exists('provider', $appInfo['fulltextsearch'])) { return; } - $providers = $appInfo['fullnextsearch']['provider']; + $providers = $appInfo['fulltextsearch']['provider']; $this->loadProvidersFromList($providers); } @@ -265,15 +264,15 @@ class ProviderService { /** - * @param INextSearchProvider $provider + * @param IFullTextSearchProvider $provider * * @throws ProviderIsNotUniqueException */ - private function providerIdMustBeUnique(INextSearchProvider $provider) { + private function providerIdMustBeUnique(IFullTextSearchProvider $provider) { foreach ($this->providers AS $knownProvider) { if ($knownProvider->getId() === $provider->getId()) { throw new ProviderIsNotUniqueException( - 'NextSearchProvider ' . $provider->getId() . ' already exist' + 'FullTextSearchProvider ' . $provider->getId() . ' already exist' ); } } @@ -281,7 +280,7 @@ class ProviderService { /** - * @param INextSearchProvider[] $providers + * @param IFullTextSearchProvider[] $providers * * @return array */ diff --git a/lib/Service/RunningService.php b/lib/Service/RunningService.php index ec47bae..dff1e87 100644 --- a/lib/Service/RunningService.php +++ b/lib/Service/RunningService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,17 +22,16 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; -use OCA\FullNextSearch\Db\TickRequest; -use OCA\FullNextSearch\Exceptions\RunnerAlreadyUpException; -use OCA\FullNextSearch\Exceptions\TickDoesNotExistException; -use OCA\FullNextSearch\Exceptions\TickIsNotAliveException; -use OCA\FullNextSearch\Model\ExtendedTick; -use OCA\FullNextSearch\Model\Runner; +use OCA\FullTextSearch\Db\TickRequest; +use OCA\FullTextSearch\Exceptions\RunnerAlreadyUpException; +use OCA\FullTextSearch\Exceptions\TickDoesNotExistException; +use OCA\FullTextSearch\Exceptions\TickIsNotAliveException; +use OCA\FullTextSearch\Model\ExtendedTick; +use OCA\FullTextSearch\Model\Runner; class RunningService { diff --git a/lib/Service/SearchService.php b/lib/Service/SearchService.php index 0431f7b..c249436 100644 --- a/lib/Service/SearchService.php +++ b/lib/Service/SearchService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,22 +21,21 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; use Exception; use OC\App\AppManager; use OCA\Circles\Api\v1\Circles; -use OCA\FullNextSearch\Exceptions\EmptySearchException; -use OCA\FullNextSearch\Exceptions\ProviderDoesNotExistException; -use OCA\FullNextSearch\INextSearchPlatform; -use OCA\FullNextSearch\INextSearchProvider; -use OCA\FullNextSearch\Model\DocumentAccess; -use OCA\FullNextSearch\Model\SearchRequest; -use OCA\FullNextSearch\Model\SearchResult; +use OCA\FullTextSearch\Exceptions\EmptySearchException; +use OCA\FullTextSearch\Exceptions\ProviderDoesNotExistException; +use OCA\FullTextSearch\IFullTextSearchPlatform; +use OCA\FullTextSearch\IFullTextSearchProvider; +use OCA\FullTextSearch\Model\DocumentAccess; +use OCA\FullTextSearch\Model\SearchRequest; +use OCA\FullTextSearch\Model\SearchResult; use OCP\IGroupManager; use OCP\IUser; use OCP\IUserManager; @@ -145,15 +144,15 @@ class SearchService { /** - * @param INextSearchPlatform $platform + * @param IFullTextSearchPlatform $platform * @param DocumentAccess $access - * @param INextSearchProvider[] $providers + * @param IFullTextSearchProvider[] $providers * @param SearchRequest $request * * @return SearchResult[] */ private function searchFromProviders( - INextSearchPlatform $platform, array $providers, DocumentAccess $access, SearchRequest $request + IFullTextSearchPlatform $platform, array $providers, DocumentAccess $access, SearchRequest $request ) { $result = []; foreach ($providers AS $provider) { diff --git a/lib/Service/SettingsService.php b/lib/Service/SettingsService.php index 2fe25a0..d035c7a 100644 --- a/lib/Service/SettingsService.php +++ b/lib/Service/SettingsService.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,10 +22,9 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Service; +namespace OCA\FullTextSearch\Service; use Exception; use OCP\IConfig; diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 9710165..3ab45dc 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -22,15 +22,14 @@ * 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/>. * - * */ -namespace OCA\FullNextSearch\Settings; +namespace OCA\FullTextSearch\Settings; use Exception; -use OCA\FullNextSearch\AppInfo\Application; -use OCA\FullNextSearch\Service\ConfigService; -use OCA\FullNextSearch\Service\MiscService; +use OCA\FullTextSearch\AppInfo\Application; +use OCA\FullTextSearch\Service\ConfigService; +use OCA\FullTextSearch\Service\MiscService; use OCP\AppFramework\Http\TemplateResponse; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/lib/Settings/AdminSection.php b/lib/Settings/AdminSection.php index cbd4263..9365477 100644 --- a/lib/Settings/AdminSection.php +++ b/lib/Settings/AdminSection.php @@ -1,12 +1,12 @@ <?php /** - * FullNextSearch - Full Text Search your Nextcloud. + * FullTextSearch - Full text search framework for Nextcloud * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Maxence Lange <maxence@artificial-owl.com> - * @copyright 2017 + * @copyright 2018 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -21,13 +21,12 @@ * * 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/>. - * - * + * */ -namespace OCA\FullNextSearch\Settings; +namespace OCA\FullTextSearch\Settings; -use OCA\FullNextSearch\AppInfo\Application; +use OCA\FullTextSearch\AppInfo\Application; use OCP\IL10N; use OCP\IURLGenerator; use OCP\Settings\IIconSection; @@ -60,7 +59,7 @@ class AdminSection implements IIconSection { * {@inheritdoc} */ public function getName() { - return $this->l10n->t('Full Next Search'); + return $this->l10n->t('Full text search'); } /** @@ -74,6 +73,6 @@ class AdminSection implements IIconSection { * {@inheritdoc} */ public function getIcon() { - return $this->urlGenerator->imagePath(Application::APP_NAME, 'fullnextsearch_black.svg'); + return $this->urlGenerator->imagePath(Application::APP_NAME, 'fulltextsearch_black.svg'); } } diff --git a/templates/navigate.php b/templates/navigate.php index 328a119..c47cb16 100644 --- a/templates/navigate.php +++ b/templates/navigate.php @@ -1,19 +1,41 @@ <?php - - -use OCA\FullNextSearch\Api\v1\NextSearch; +/** + * FullTextSearch - Full text search framework for Nextcloud + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Maxence Lange <maxence@artificial-owl.com> + * @copyright 2018 + * @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/>. + * + */ + +use OCA\FullTextSearch\Api\v1\FullTextSearch; +use OCA\FullTextSearch\AppInfo\Application; use OCP\Util; -NextSearch::addJavascriptAPI(); -Util::addScript(NextSearch::appName(), 'fullnextsearch'); -Util::addStyle(NextSearch::appName(), 'fullnextsearch'); +FullTextSearch::addJavascriptAPI(); +Util::addScript(Application::APP_NAME, 'navigate'); +Util::addStyle(Application::APP_NAME, 'navigate'); ?> <div id="search_header"> <input id="search_input" placeholder="<?php p($l->t('Search on %s', [$_['themingName']])); ?>"> -<!-- <input id="search_submit" type="submit"--> -<!-- value="--><?php //p($l->t('Search on %s', [$_['themingName']])); ?><!--">--> </div> diff --git a/templates/settings.admin.php b/templates/settings.admin.php index 5d32d8b..dae047d 100644 --- a/templates/settings.admin.php +++ b/templates/settings.admin.php @@ -1,6 +1,30 @@ <?php +/** + * FullTextSearch - Full text search framework for Nextcloud + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Maxence Lange <maxence@artificial-owl.com> + * @copyright 2018 + * @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/>. + * + */ -use OCA\FullNextSearch\AppInfo\Application; +use OCA\FullTextSearch\AppInfo\Application; use OCP\Util; Util::addScript(Application::APP_NAME, 'admin.elements'); @@ -14,14 +38,14 @@ Util::addStyle(Application::APP_NAME, 'admin'); <div id="fns" class="section"> <span> - <a href="https://github.com/nextcloud/fullnextsearch/wiki" target="_blank"> + <a href="https://github.com/nextcloud/fulltextsearch/wiki" target="_blank"> Please check the wiki</a> - for documentation related to the installation and the configuration of the Full Text Search within your Nextcloud + for documentation related to the installation and the configuration of the Full text search within your Nextcloud </span> <br/> <br/> - <h2><?php p($l->t('Full Next Search')) ?></h2> + <h2><?php p($l->t('Full text search')) ?></h2> <div class="div-table"> <div class="div-table-row"> @@ -31,7 +55,7 @@ Util::addStyle(Application::APP_NAME, 'admin'); <em>Select the app that will be used to index content and answer search queries.</em> </div> <div class="div-table-col"> - <select id="fns_platforms"> + <select id="fts_platforms"> <option></option> </select> </div> @@ -44,7 +68,7 @@ Util::addStyle(Application::APP_NAME, 'admin'); <em>Lower the value if the server is short on memory.</em> </div> <div class="div-table-col"> - <input type="text" class="small" id="fns_chunk_size"/> + <input type="text" class="small" id="fts_chunk_size"/> </div> </div> |