How to implement Elasticsearch in Nexcloud


(HF) #21

This did it for me, works like a charm:

yum install tesseract

Then pick you choice out of the many languages to be recognized and install them (English is installed by default): “yum search all tesseract”

and install the requered language(s) e.g. yum install tesseract-langpack-fra

Install the full text search OCR app in nextcloud, go to settings -> search and set your installed languages (watch the language abbreviation e.g. eng,fra,deu) and enable OCR.

Just not sure the interval when elasticsearch re-indexes, maybe this is related to the cronjob?

Here is a test image to upload and test

(HF) #22

Just as a tip, the RedHat way syntax would be:

sudo -u apache scl enable php71 ‘php -d memory_limit=512M /usr/share/nextcloud/occ fulltextsearch:index’

scl enable php71 ensures that all php71 related environment variables are being used.

(Dan) #23

Strangely, the yum search all comes up with many language packs, but none mention English. Even did a grep in case I was inadvertently looking past it. ?? OK, there is -enm for Middle English, but I’m not going to be working with Chaucer.

(HF) #24

My bad example.


Adjusted my post above. Sorry

(Dan) #25

That’s probably something I should have found in the docs myself–thanks!

(Steve) #26

I do not have the remi-phpscl module installed my directory is /opt/rh/rh-php71 and not /opt/rh/rh-php56/ do i need to install the remi-phpscl module to run the index command correctly?

(HF) #27

The remi set comes from the php-scl module that can be installed seperately. Nextcloud takes care of a different scl version of php. Yes, that is confusing.

Use this command instead:

(HF) #28

How is the experience so far? I am impressed with the results.

(Steve) #29

Hello I had to reinstall Elasticsearch now when I run sudo -u apache /opt/rh/rh-php71/root/usr/bin/php -d memory_limit=512M /usr/share/nextcloud/occ fulltextsearch:index I get the following error.

In IndexService.php line 149:

Check your user/password and the index assigned to that cloud

(Markus Neuberger) #30

Did you try to reconfigure the Nextcloud fulltext app in the Nextcloud admin settings?

You may try to reset the index and start over.

sudo -u apache scl enable php71 'php -d memory_limit=512M /usr/share/nextcloud/occ fulltextsearch:reset'