Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be clear that ES7 is no longer supported #272

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

jtrees
Copy link
Contributor

@jtrees jtrees commented Jul 25, 2023

The current docs are misleading. I broke my NC install because there was no indication that ES7 is no longer supported.

Hopefully this will protect another admin out there.

Source: #269 (comment)

@jtrees jtrees requested a review from R0Wi July 25, 2023 16:32
@R0Wi R0Wi merged commit bc8da90 into nextcloud:master Jul 25, 2023
@jtrees jtrees deleted the update-readme branch July 25, 2023 16:37
@ArtificialOwl
Copy link
Member

Yes, but ES7 should still works with nc26.

@jtrees
Copy link
Contributor Author

jtrees commented Aug 1, 2023

Yes, but ES7 should still works with nc26.

Interesting, I actually landed here because fulltext search stopped working after upgrading to NC 27.

@R0Wi
Copy link
Member

R0Wi commented Aug 1, 2023

I was having issues when trying to use app version >= 26 (which is using ES client 8) together with ES 7.x.
In general I'd recommend one uses the same major version for the server and the client package.
https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-api-compatibility.html

Btw: it highly depends on which exact server version you're using. For example with older versions of ES 7, the newer ES 8 client (which is included in app versions >= 26) is not compatible. Here an example when running ES 7.6.0:

  1. Run the server
    docker run -d -p 9200:9200 -e cluster.name=docker-cluster -e bootstrap.memory_lock=true -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -e discovery.type=single-node --name elastic_server elasticsearch:7.6.0
  2. Create a new directory and run composer init and composer require elasticsearch/elasticsearch:8.6.1 to install the same client library as used in this app
  3. Create the following index.php:
<?php

require_once 'vendor/autoload.php';

$client = Elastic\Elasticsearch\ClientBuilder::create()
    ->setHosts(['http://localhost:9200'])
    ->build();

$info = $response = $client->info();

echo($info);
  1. Run the script via php index.php

You will see the following error:

PHP Fatal error:  Uncaught Elastic\Elasticsearch\Exception\ProductCheckException: The client noticed that the server is not Elasticsearch and we do not support this unknown product in /var/www/html/elastic-test/vendor/elasticsearch/elasticsearch/src/Traits/ProductCheckTrait.php:32

which is produced because ES 7.6.0 does not set an expected header in the response (see also here).

So this is just one sample where client and server are not compatible and I'm sure there are many more 😄

@julian70400
Copy link

So, if I use my elasticsearch 7.17.13, it explains why I can't find nothing with my Nextcloud 26.0.7 ?

If yes, it should be cool to avoid a bit more.. I broke my prod because of that.

@R0Wi
Copy link
Member

R0Wi commented Sep 29, 2023

Well.. it depends 😄 It could be the cause of the error but I'd recommend: lower your loglevel, reproduce your problem and inspect the server logs. Maybe it will show you what went wrong.

I definitely agree. To me it would make sense to add a setupcheck for this or at least have some occ fulltextsearch-command to check the compatibility of the setup properly.

@julian70400
Copy link

Could it be related ?

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: 0, expected: ["simple"]) fail
    Error detected, unlocking process ok
    In Test.php line 676:

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

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

@R0Wi
Copy link
Member

R0Wi commented Sep 29, 2023

I saw this error recently. Maybe our conversation from #237 (comment) will help you.

Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants