Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2020-07-23 04:08:03 +0300
committerMaxence Lange <maxence@artificial-owl.com>2020-07-23 04:08:03 +0300
commite0f59f58a177e06ed92fc64c65f8e94ed41bde1d (patch)
treee0a7c8c16609e6b78efcff1d0776d3a1561bb6f0
parent6076dce88b5bdadc39b1fc2d716eda75dc3674c7 (diff)
more testv1.4.2
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--composer.lock13
-rw-r--r--lib/Command/Test.php20
-rw-r--r--lib/Model/SearchRequest.php8
-rw-r--r--lib/Service/ProviderService.php8
-rw-r--r--lib/Service/TestService.php2
5 files changed, 36 insertions, 15 deletions
diff --git a/composer.lock b/composer.lock
index 4da76e3..9276f32 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,7 +1,7 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "30bac8230c691b2aa3c666987235b4c9",
@@ -12,12 +12,12 @@
"source": {
"type": "git",
"url": "https://github.com/daita/my-small-php-tools.git",
- "reference": "688a627c2eed08042a09b50cab7171edde91de27"
+ "reference": "a253279a181ae6c09be80d786377fdb7afd37741"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/688a627c2eed08042a09b50cab7171edde91de27",
- "reference": "688a627c2eed08042a09b50cab7171edde91de27",
+ "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/a253279a181ae6c09be80d786377fdb7afd37741",
+ "reference": "a253279a181ae6c09be80d786377fdb7afd37741",
"shasum": ""
},
"require": {
@@ -40,7 +40,7 @@
}
],
"description": "My small PHP Tools",
- "time": "2020-01-29T12:34:08+00:00"
+ "time": "2020-07-07T11:06:29+00:00"
}
],
"packages-dev": [],
@@ -52,5 +52,6 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
diff --git a/lib/Command/Test.php b/lib/Command/Test.php
index ed3d4f2..1894f04 100644
--- a/lib/Command/Test.php
+++ b/lib/Command/Test.php
@@ -460,6 +460,26 @@ class Test extends ACommandBase {
$output, $testPlatform, $testProvider, $access, '-document is a simple test',
[]
);
+ $this->search(
+ $output, $testPlatform, $testProvider, $access, 'document is a simple +test +testing',
+ [TestService::DOCUMENT_TYPE_SIMPLE]
+ );
+ $this->search(
+ $output, $testPlatform, $testProvider, $access, 'document is a simple +test -testing',
+ []
+ );
+ $this->search(
+ $output, $testPlatform, $testProvider, $access, 'document is a +simple -test -testing',
+ []
+ );
+ $this->search(
+ $output, $testPlatform, $testProvider, $access, '+document is a simple -test -testing',
+ [TestService::DOCUMENT_TYPE_LICENSE]
+ );
+ $this->search(
+ $output, $testPlatform, $testProvider, $access, 'document is a +simple -license +testing',
+ [TestService::DOCUMENT_TYPE_SIMPLE]
+ );
}
diff --git a/lib/Model/SearchRequest.php b/lib/Model/SearchRequest.php
index c8fe66c..ab07e55 100644
--- a/lib/Model/SearchRequest.php
+++ b/lib/Model/SearchRequest.php
@@ -49,10 +49,10 @@ class SearchRequest implements ISearchRequest, JsonSerializable {
/** @var array */
- private $providers;
+ private $providers = [];
/** @var string */
- private $search;
+ private $search = '';
/** @var bool */
private $emptySearch = false;
@@ -64,7 +64,7 @@ class SearchRequest implements ISearchRequest, JsonSerializable {
private $size = 10;
/** @var string */
- private $author;
+ private $author = '';
/** @var array */
private $tags = [];
@@ -76,7 +76,7 @@ class SearchRequest implements ISearchRequest, JsonSerializable {
public $subTags = [];
/** @var array */
- private $options;
+ private $options = [];
/** @var array */
private $parts = [];
diff --git a/lib/Service/ProviderService.php b/lib/Service/ProviderService.php
index fda2579..1f2634c 100644
--- a/lib/Service/ProviderService.php
+++ b/lib/Service/ProviderService.php
@@ -226,11 +226,11 @@ class ProviderService implements IProviderService {
$providerId, ConfigService::PROVIDER_INDEXED
);
} catch (ProviderOptionsDoesNotExistException $e) {
- $this->miscService->log('Could not determine if provider with id '
- . $providerId
- . ' was properly indexed because the corresponding provider-option could not be found.'
+ $this->miscService->log('Could not determine if provider with id \''
+ . $providerId
+ . '\' was properly indexed because the corresponding provider-option could not be found.'
. ' Make sure the initial indexing process has been completed successfully.'
- );
+ , 0);
return false;
}
diff --git a/lib/Service/TestService.php b/lib/Service/TestService.php
index f2a6f58..d9179cd 100644
--- a/lib/Service/TestService.php
+++ b/lib/Service/TestService.php
@@ -112,7 +112,7 @@ class TestService {
public function generateIndexDocumentSimple(IIndexOptions $options): IIndexDocument {
$indexDocument = $this->generateIndexDocument(self::DOCUMENT_TYPE_SIMPLE);
- $indexDocument->setContent('document is a simple test');
+ $indexDocument->setContent('testing document is a simple test');
return $indexDocument;
}