Upgrading Nextant to fulltextsearch

I am attempting to upgrade my full text search capabilities away from the now EOL nextant to the shiny new fulltextsearch elasticsearch but I am having some trouble. When running my first index, I am met with this unfortunate error message:

  Your ElasticSearchPlatform is not configured properly

fulltextsearch:index [--output [OUTPUT]]

I’m not sure where to look for configuration except the admin console under ....nextcloud/settings/admin/fulltextsearch

Is there a way to rerun the configuration? Did I miss a step? I did find the GitHub wiki to be a bit unclear, so maybe I missed something?

Here are my steps to install and configure:

  1. Remove Nextant app from NextCloud
  2. Remove Solr as described here.
  3. Install fulltextsearch app and files_fulltextsearch directly from the appstore,
  4. Install Java and elasticsearch on the server
  5. sudo apt-get install openjdk-8-jre
  6. curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.3.deb
  7. sudo dpkg -i elasticsearch-6.1.3.deb
  8. sudo /etc/init.d/elasticsearch start
  9. Test that elasticsearch was up and running with curl
  10. Install attachment processor plugin with sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
  11. Install FullTextSearch_ElasticSearch from the appstore
  12. Install the ElasticSearch servlet:
  13. wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
  14. sudo apt-get install apt-transport-https
  15. echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
  16. sudo apt-get update && sudo apt-get install elasticsearch
  17. sudo service elasticsearch restart
  18. Navigate to admin console -> full text search and select search platform, input server address or IP, and name index. Make sure the name of the index is lowercase only.
  19. Run first index with sudo -u www-data php ./occ fulltextsearch:index

After receiving the error, I rebooted and attempted again, but no luck.


You need to setup the App in the Admin Settings webpage of your Nextcloud

Verify that the information you entered there are correct.

I’ve done that (step 18). I selected elasticsearch as the platform (it was
the only option) and gave the index a name and pointed it to the local server.

Can you please verify the information you entered are correct ?

This error is simple and should only pop when missing the host and/or the name of the index.

Looks like there’s a problem with DNS, I had entered the servlet address by hostname and it was failing as per the error above. After inputting the address by IP, I ran the command again, this time I was met with this error:

~$ sudo -u www-data php /var/www/nextcloud/occ  fulltextsearch:index

  please add ingest-attachment plugin to elasticsearch

fulltextsearch:index [--output [OUTPUT]]

I found this rather odd, as I definitely installed ingest-attachment. upon attempting to reinstall it, it returned:

~$ sudo /usr/share/elasticsearch/bin/elasticsearch-plugin  install ingest-attachment
-> Downloading ingest-attachment from elastic
[=================================================] 100%Â Â 
ERROR: plugin directory [/usr/share/elasticsearch/plugins/ingest-attachment] already exists; if you need to update the plugin, uninstall it first using command 'remove ingest-attachment'

I attempted to uninstall it and reinstall it, which succeeded, but after running the index again, it still tells me that the ingest-attachment plugin is missing.

Could you try to:

 ./occ fulltextsearch:reset
 ./occ fulltextsearch:index

No dice:

~$ sudo -u www-data php /var/www/nextcloud/occ  fulltextsearch:reset
~$ sudo -u www-data php /var/www/nextcloud/occ  fulltextsearch:index

  please add ingest-attachment plugin to elasticsearch

fulltextsearch:index [--output [OUTPUT]]

I’m assuming you intended for me to run those commands as www-data user?

you might need to restart elasticsearch after the install of the plugin ?

The elastic search service was of course restarted. I even tried to reboot
the server to no avail. The index will not run, it just thinks it is
missing the plugin.

any other advices?

in the file lib/Service/IndexService.php in the method initializeIndex() can you edit the line (around 85) to

throw new ConfigurationException(
	'please add ingest-attachment plugin to elasticsearch - ' . $e->getMessage()

and paste the result

someone tried to lower the case of the index:

Can you try this ?

Like the other useriI also am confused about what file you are referring to?
/path/to/nextcloud/lib/ doesn’t have a Service directoryand neither does /lib/. There is a file under /path/to/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php but you told the otheruser this was not the correct file.

That being said, my index name also had capital letters, so I changed them to lowercase and now the index is running.

thanks for your help

Same thing happened lowered case of index name and problem solved go figure. The devil is in the details.


This is a very useful guide. Please add to step 18 that the index name should be lower case.

I also suggest not installing elasticsearch 6.2 yet. It did not work for me and I needed to downgrade to 6.1.3 for now.

1 Like

I found this rather odd, as I definitely installed ingest-attachment. upon attempting to reinstall it, it returned:

I had the same issue today. I definitely installed the ingest-attachment as well, but also got the message that it was missing. But what solved it for me was to just run

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin  install ingest-attachment

sudo -u www-data php /var/www/nextcloud/occ fulltextsearch:index 

(without having restarted elastic service) and it went through then at that time.


The index of a new file is automatic or is need to launch “occ …”


you will need to launch the first index using the command line

@daniv i could install it without steps 12, 13, 15 and 16.

step 6: is currently elasticsearch-6.2.4.deb

@cult please where is the data of the index stored? I need to adjust the path because i don’t have so much space on the primary harddisk of the VM. For that purpose i have an extra harddisk which is big enough to hold the index data.