Open WHRoeder opened 4 years ago
I've the same problem.
I've applied the patch from #107 and now it seems to be ok but only for the first search test:
Searching basic keywords:
- 'test' (result: 1, expected: ["simple"]) ok
- 'document is a simple test' (result: 0, expected: ["simple","license"]) fail
Error detected, unlocking process ok
In Test.php line 652:
Unexpected SearchResult: {"provider":{"id":"test_provider","na
me":"Test Provider"},"platform":{"id":"elastic_search","name":
"Elasticsearch"},"documents":[],"info":[],"meta":{"timedOut":f
alse,"time":8,"count":0,"total":0,"maxScore":0}}
i'm using elasticsearch 7.7.0 and the latest nextcloud version.
Having the same issue as @thomaslc66 with Elasticsearch 7.7.0 and Elasticsearch Platform 1.5.1 on Nextcloud 18. Also tried this with Elasticsearch 7.1.1, but had the very same issue.
I am having the same issue with Nextcloud 18 and Nextcloud 19.
same for me on Nexcloud 18.0.4 with Elastic search 7.7.0 and Elasticsearch Platform 1.5.1 and patch #107 applied.
It works! Thank you very much!
Same issue for me with Nextcloud 19 and ES 7.7.0 and platform 1.5.1 and patch #107 applied. In Nextcloud, the Full Text Search returns empty always. Using curl I get search results when I use curl with elasticsearch-host:9200/nextcloud/_search?q=xxx
@thomaslc66, please let me know how to see that test-result.
@wackazong, did you install NC 19 after applied the patch? The patch get removed when updating.
@weberhofer yes I did. I checked and its still there. I get an error when I run fulltextsearch:test (see below). When I search in Nextcloud I can see that the result JSON from the server contains an empty array for result
{"request":{"providers":["all"],"author":"Alexander","search":"und","page":1,"size":10,"parts":[],"queries":[],"options":{"files_local":"0","files_external":"0","files_group_folders":"0","files_extension":""},"metatags":[],"subtags":[],"tags":[]},"version":"1.4.1","result":[],"status":1}
The error for test is as follows:
root@81207f981c0f:/var/www/html# ./occ fulltextsearch:test
.Testing your current setup:
Creating mocked content provider. ok
Testing mocked provider: get indexable documents. (2 items) ok
Loading search platform. (Elasticsearch) ok
Testing search platform. ok
Locking process ok
Removing test. ok
Pausing 3 seconds 1 2 3 ok
Initializing index mapping. ok
Indexing generated documents. ok
Pausing 3 seconds 1 2 3 ok
Retreiving content from a big index (license). (size: 32386) ok
Comparing document with source. ok
Searching basic keywords:
- 'test' (result: 1, expected: ["simple"]) ok
- 'document is a simple test' (result: 0, expected: ["simple","license"]) fail
Error detected, unlocking process ok
In Test.php line 652:
Unexpected SearchResult: {"provider":{"id":"test_provider","name":"Test Provider"},"platform":{"id":"elastic_searc
h","name":"Elasticsearch"},"documents":[],"info":[],"meta":{"timedOut":false,"time":11,"count":0,"total":0,"maxSco
re":0}}
fulltextsearch:test [--output [OUTPUT]] [-j|--json] [-d|--platform_delay PLATFORM_DELAY]
@weberhofer like @wackazong show you, just run the occ with the fulltextsearch:test and the second basic search will fail.
My question (problem) is that when i use postman to make a request to the elasticsearch server, the server returns the array correctly with the results listed.
The strange thing is that when I use a test account with just a couple of documents and I just rund fulltextsearch:index for that user, everything works beautifully and I can see results. For the main user it is a lot of files and I did not finish indexing yet. Could it be that results are not displayed until there was one full index of a user?
The error for test is as follows:
root@81207f981c0f:/var/www/html# ./occ fulltextsearch:test .Testing your current setup: Creating mocked content provider. ok Testing mocked provider: get indexable documents. (2 items) ok Loading search platform. (Elasticsearch) ok Testing search platform. ok Locking process ok Removing test. ok Pausing 3 seconds 1 2 3 ok Initializing index mapping. ok Indexing generated documents. ok Pausing 3 seconds 1 2 3 ok Retreiving content from a big index (license). (size: 32386) ok Comparing document with source. ok Searching basic keywords: - 'test' (result: 1, expected: ["simple"]) ok - 'document is a simple test' (result: 0, expected: ["simple","license"]) fail Error detected, unlocking process ok In Test.php line 652: Unexpected SearchResult: {"provider":{"id":"test_provider","name":"Test Provider"},"platform":{"id":"elastic_searc h","name":"Elasticsearch"},"documents":[],"info":[],"meta":{"timedOut":false,"time":11,"count":0,"total":0,"maxSco re":0}} fulltextsearch:test [--output [OUTPUT]] [-j|--json] [-d|--platform_delay PLATFORM_DELAY]
I'm getting this same error when I try using PR#:107. The only solution I could find at the moment was to downgrade back to Elasticsearch 7.6.2
@azurefreecovid Can you tell me how to downgrade to 7.6.2. I have a problems with it. I need also ingest-attachment. I use Ubuntu 20.04 LTS. Please can you tell me your steps ? Thanks.
Today I've upgraded Elasticsearch and Nextcloud (including all apps) to the most current available version. The fulltext search works fine with this setup :-)
Thanks for your help.
sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:test stops wit following exception:
0 /var/www/nextcloud/apps/fulltextsearch/lib/Model/SearchRequest.php(700): OCA\FullTextSearch\Model\SearchRequest->getProviders()
1 [internal function]: OCA\FullTextSearch\Model\SearchRequest->jsonSerialize()
2 /var/www/nextcloud/apps/fulltextsearch_elasticsearch/lib/Service/SearchService.php(103): json_encode(Object(OCA\FullTextSearch\Model\SearchRequest))
3 /var/www/nextcloud/apps/fulltextsearch_elasticsearch/lib/Platform/ElasticSearchPlatform.php(336): OCA\FullTextSearch_ElasticSearch\Service\SearchService->searchRequest(Object(Elasticsearch\Client), Object(OCA\FullTextSearch\Model\SearchResult), Object(OC\FullTextSearch\Model\DocumentAccess))
4 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Test.php(584): OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform->searchRequest(Object(OCA\FullTextSearch\Model\SearchResult), Object(OC\FullTextSearch\Model\DocumentAccess))
5 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Test.php(436): OCA\FullTextSearch\Command\Test->search(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\FullTextSearch\Provider\TestProvider), Object(OC\FullTextSearch\Model\DocumentAccess), 'test', Array)
6 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Test.php(171): OCA\FullTextSearch\Command\Test->testSearchSimple(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\FullTextSearch\Provider\TestProvider))
7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\FullTextSearch\Command\Test->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
8 /var/www/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(915): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Test), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
12 /var/www/nextcloud/lib/private/Console/Application.php(214): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
13 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
14 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')