nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch_elasticsearch
GNU Affero General Public License v3.0
81 stars 30 forks source link

Incompatibility of Full text search - Elasticsearch Platform 1.5.1 with Elasticsearch version 7.7.0 #105

Open WHRoeder opened 4 years ago

WHRoeder commented 4 years ago

sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:test stops wit following exception:

MoriarT3a commented 4 years ago

I've the same problem.

thomaslc66 commented 4 years ago

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.

p-klassen commented 4 years ago

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.

dst21 commented 4 years ago

I am having the same issue with Nextcloud 18 and Nextcloud 19.

davidcheeeese commented 4 years ago

same for me on Nexcloud 18.0.4 with Elastic search 7.7.0 and Elasticsearch Platform 1.5.1 and patch #107 applied.

MoriarT3a commented 4 years ago

It works! Thank you very much!

wackazong commented 4 years ago

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

weberhofer commented 4 years ago

@thomaslc66, please let me know how to see that test-result.

weberhofer commented 4 years ago

@wackazong, did you install NC 19 after applied the patch? The patch get removed when updating.

wackazong commented 4 years ago

@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]
thomaslc66 commented 4 years ago

@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.

wackazong commented 4 years ago

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?

azurefreecovid commented 4 years ago

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

micky1067 commented 4 years ago

@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.

WHRoeder commented 4 years ago

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.