Fulltextsearch 26.0.0 seems to ignore credentials for ROR on elasticsearch

Yeah, same problem here. In my case I installed Kibana and wanted authentication on my ES server because of that, and then nextcloud fulltext search stopped working :confused:

It looks like some stuff has changed with the libs fulltextsearch_elasticsearch uses: You are not supposed to enter your username and password in the host field but instead use a second argument for this.

Changed the following:

line 385 of fulltextsearch_elasticsearch/lib/Platform/ElasticSearchPlatform.php no reads:

$cb = ClientBuilder::create()
							   ->setHosts($hosts)
							   ->setBasicAuthentication('username', 'password')
							   ->setRetries(3);

and not:

$cb = ClientBuilder::create()
							   ->setHosts($hosts)
							   ->setRetries(3);

Ofcourse this is just some ducktape, but for now the module works again :slight_smile:

I think the best fix here would be to add 2 fields to the config form and use them like I did above. THe suggestion to use your creds in the url like they do in the example just doesn’t work anymore. BUt those are just my 2 cents, this is not my project and I’m not a nextcloud developer :wink:

2 Likes