nextcloud / fulltextsearch

🔍 Core of the full-text search framework for Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch
GNU Affero General Public License v3.0
216 stars 51 forks source link

fulltextsearch test failing on nextcloud 15 #477

Open disc0very opened 5 years ago

disc0very commented 5 years ago

Hello please help me i can't find any solution! Thanks

Here is my env: NextCloud 15.0.5 Full text search 1.2.5
Full text search - Elasticsearch Platform 1.2.4
Full text search - Files 1.2.6
Full text search - Files - Tesseract OCR 1.2.0
PHP 7.2.10 mysql Ver 15.1 Distrib 5.5.60-MariaDB

/var/www/html/nextcloud# sudo -u apache php 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:

danst0 commented 4 years ago

Same issue here, what did you do to resolve it?

Happyfeet01 commented 4 years ago

i have this issue too.

Here the Log result from FTS

`root@dasnetzundich /var/log/elasticsearch # sudo -uwww-data php /var/www/nextcloud/occ fulltextsearch:search lars ratingen search

In Connection.php line 632:

{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:63] [bool] failed to parse field [should]"}],"type":"x_content_parse_exception","reason":"[1:63] [bool] failed to parse field [must]"
,"caused_by":{"type":"x_content_parse_exception","reason":"[1:63] [bool] failed to parse field [should]","caused_by":{"type":"x_content_parse_exception","reason":"[1:63] [bool] failed to parse field [should
]","caused_by":{"type":"illegal_state_exception","reason":"expected value but got [START_ARRAY]"}}}},"status":400}

and the logs from Nextcloud https://paste.dasnetzundich.de/view/bff9f8f8#L18 `

thomaslc66 commented 4 years ago

Same problem here, this issue needs to be reopened

sbauschulte commented 4 years ago

I get the same error - please reopen.

disc0very commented 4 years ago

Same issue here, what did you do to resolve it?

Can’t actually remember. Make sure Elasticsearch work properly using curl:

curl -XGET 'localhost:9200/?pretty'

and check that fulltextsearch config in nextcloud correctly link to the elastisearch servlet address and index name. Good luck

Happyfeet01 commented 4 years ago

There is an hotfix, when you have installed elasticsearch 7.7.0 and later https://github.com/nextcloud/fulltextsearch_elasticsearch/pull/107

sbauschulte commented 4 years ago

Thanks for your suggestion! I tried it an now i get this:

Searching basic keywords:

When I do a "curl -XGET 'localhost:9200/?pretty'" i get this:

{ "name" : "nextcloud-server", "cluster_name" : "elasticsearch", "cluster_uuid" : "zV__XZHuRgWHUBIV3xgBdw", "version" : { "number" : "7.7.0", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "81a1e9eda8e6183f5237786246f6dced26a10eaf", "build_date" : "2020-05-12T02:01:37.602180Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }

Happyfeet01 commented 4 years ago

What happens when you start the Fulltextsearch Scan?

Happyfeet01 commented 4 years ago

If it works, make a review please. Without this review the update can’t release.

Thanks

sbauschulte commented 4 years ago

What exactly do you mean by "Fulltextsearch Scan" ? If I try to search from nextcloud I still get no response from the dialog. image

On the commandline i can successfully search with "curl -XGET localhost:9200/main_elastic/_search?q=lemon":

{"took":44,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":30,"relation":"eq"},"max_score":14.416168,"hits":[{"_index":"main_elastic","_type":"standard","_id":"files:176422","_score":14.416168,"_source":{"owner":"simonb","groups":["Kollegen","KollegenPlus"],"circles":[],"metatags":["files_local"],"source":"files_local",

In this case I git a searchresult of 313K. It's really frustrating because everything seems to work fine except the integration into nextcloud.

thomaslc66 commented 4 years ago

Hello, I have the exact same error as @sbauschulte

Thanks for your suggestion! I tried it an now i get this:

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 Pro vider"},"platform":{"id":"elastic_search","name":"Elasticsearch"},"document s":[],"info":[],"meta":{"timedOut":false,"time":142,"count":0,"total":0,"ma xScore":0}}

When I do a "curl -XGET 'localhost:9200/?pretty'" i get this:

{ "name" : "nextcloud-server", "cluster_name" : "elasticsearch", "cluster_uuid" : "zV__XZHuRgWHUBIV3xgBdw", "version" : { "number" : "7.7.0", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "81a1e9eda8e6183f5237786246f6dced26a10eaf", "build_date" : "2020-05-12T02:01:37.602180Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }

But I've asked on the fulltextsearch_elasticsearch repository: Issue here

tao-polito commented 4 years ago

Hi There,

I got the same error as @thomaslc66 after applying nextcloud/fulltextsearch_elasticsearch#107, the first round of test seems ok, but:

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

fulltextsearch:test [--output [OUTPUT]] [-j|--json] [-d|--platform_delay PLATFORM_DELAY]

When I do curl -XGET http://localhost:9200/?pretty I get:

{ "name" : "nc_search", "cluster_name" : "nextcloud", "cluster_uuid" : "8TswmC9gT6GYiTg32CT_ng", "version" : { "number" : "7.7.1", "build_flavor" : "default", "build_type" : "rpm", "build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423", "build_date" : "2020-05-28T16:30:01.040088Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }

When I do curl -XGET http://localhost:9200/nextcloud/_search?q=Basic, I got the following results (shortened... but it seems elasticsearch works perfectly in the backend.

[.....] Nextcloud Web interface\n\tWeb browser requirements\n\tNavigating the main user interface\n\n\tFiles & synchronization\n\tAccessing your files using the Nextcloud Web interface\n\tAccessing Nextcloud files using WebDAV\n\tGallery app\n\tManaging deleted files\n\tDesktop and mobile synchronization\n\tEncrypting your Nextcloud files on the server\n\tUsing Federation Shares\n\tMaking anonymous uploads\n\tLarge file uploads\n\tStorage quota\n\tVersion control\n\tProjects\n\n\tGroupware\n\tUsing the Contacts app\n\tUsing the Calendar app\n\tSynchronizing with Android\n\tSynchronizing with iOS\n\tSynchronizing with macOS\n\tSynchronizing with Thunderbird\n\tSynchronizing with KDE Kontact\n\tSynchronizing with the GNOME desktop\n\tSynchronizing with Windows 10\n\n\tSetting your preferences\n\tUsing two-factor authentication\n\tConfiguring two-factor authentication\n\tRecovery codes in case you lost your 2nd factor\n\tLogging in with two-factor authentication\n\tUsing client applications with two-factor authentication\n\n\tManage connected browsers and devices\n\tManaging connected browsers\n\tManaging devices\n\tDevice-specific passwords and password changes\n\n\tExternal Storage\n\tConfiguring external Storage","tags":[],"attachment":{"date":"2020-06-04T07:04:51Z","content_type":"application/pdf","author":"The Nextcloud developers","language":"en","title":"Nextcloud User Manual","content_length":96923},"provider":"files","subtags":[],"parts":{"comments":""},"links":[],"share_names":{"pboccardo":"Nextcloud Manual.pdf"},"hash":"55f080439a694e755f77b96f69d07d2e"}}]}}

here is the system info: Centos 8 Nextcloud version: 17.07 Apache/2.4.37 (centos) PHP 7.2.11

Thanks a lot for your suggestions in advance.

SomwareHR commented 2 years ago

Hi, Any solutions? It's 2022, Nextcloud snap version 24, ElasticSearch 6, failure failed with same error as tao-polito's:

$ sudo nextcloud.occ full:test

results with

``` license - ["group_1"] - (result: 0, expected: ["license"]) fail Error detected, unlocking process ok In Test.php line 675: Unexpected SearchResult: {"provider":{"id":"test_provider","name":"Test Provider"}, "platform":{"id":"elastic_search","name":"Elasticsearch"}, "documents":[],"info":[], "meta":{"timedOut":false,"time":1,"count":0,"total":0,"maxScore":0}} ```
disc0very commented 2 years ago

Hi, Any solutions? It's 2022, Nextcloud snap version 24, ElasticSearch 6, failure failed with same error as tao-polito's:

$ sudo nextcloud.occ full:test

results with

license - ["group_1"] -  (result: 0, expected: ["license"]) fail

Error detected, unlocking process ok

In Test.php line 675:

Unexpected SearchResult: 
{"provider":{"id":"test_provider","name":"Test Provider"},
"platform":{"id":"elastic_search","name":"Elasticsearch"},
"documents":[],"info":[],
"meta":{"timedOut":false,"time":1,"count":0,"total":0,"maxScore":0}}

hi, i solved it recently on a nextcloud 24 (centos 7 installation) by installing elasticsearch version 7 instead of version 6. I also reinstalled the ingest attachment plugin for elastic search. Good luck