ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Nextcloud and Full Text Search

    Scheduled Pinned Locked Moved IT Discussion
    11 Posts 3 Posters 2.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DonahueD
      Donahue
      last edited by

      I have installed NC as per @JaredBusch's great guide. Now however, I want to enable both full text search and OCR for the files in NC, but I am running into issues, probably because I don't know a whole lot about linux in general and fedora in specific. A lot of the guides that I am finding online seem to be for debian or ubuntu.

      So far, I have installed the 4 apps currently in the NC appstore for full text search.
      67376bc0-7dd8-4df8-919f-eb92b6f96670-image.png

      But when I attempt to run the first index, following this guide I get this error:

      [root@Nextcloud ~]# sudo -u apache php /var/www/html/nextcloud/occ fulltextsearch:index
      
      In Index.php line 379:
      
        failed platform test.
      
      
      fulltextsearch:index [--output [OUTPUT]] [-r|--no-readline] [--] [<options>]
      

      If I run a test, it shows that the platform is down:

      [root@Nextcloud ~]# sudo -u apache php /var/www/html/nextcloud/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. fail
      In Test.php line 300:
      
        Search platform (Elasticsearch) down ?
      
      
      fulltextsearch:test [--output [OUTPUT]] [-j|--json] [-d|--platform_delay PLATFORM_DELAY]
      

      If I try and enable the elasticsearch service, I get this:

      [root@Nextcloud ~]# sudo systemctl enable elasticsearch
      Failed to enable unit: Unit file elasticsearch.service does not exist.
      

      All this leads me to believe that the app method of installation does not work right, maybe just on fedora? Other methods of installation have different syntax, and I am struggling to figure out how to translate it to fedora.

      Looking at the official install guide here, It looks like I need to add the elastic.co repository, but it is https, and so I need to enable that. If I try and just run sudo dnf install elasticsearch it complains about nothing providing it's requirements, so that leads me to believe it needs that other repository.

      the guide shows this for debian:

      wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
      sudo apt-get install apt-transport-https
      echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
      sudo apt-get update && sudo apt-get install elasticsearch
      

      what should this be for fedora?

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch @Donahue
        last edited by

        @Donahue said in Nextcloud and Full Text Search:

        what should this be for fedora?

        [jbusch@dt-jared ~]$ sudo dnf provides elasticsearch
        Last metadata expiration check: 2:28:39 ago on Tue 08 Jan 2019 11:12:36 AM CST.
        elasticsearch-1.7.1-3.fc24.noarch : Open source, flexible, distributed search and analytics engine
        Repo        : fedora
        Matched from:
        Provide    : elasticsearch = 1.7.1-3.fc24
        
        1 Reply Last reply Reply Quote 0
        • DonahueD
          Donahue
          last edited by

          @JaredBusch said in Nextcloud and Full Text Search:

          sudo dnf provides elasticsearch

          [root@Nextcloud ~]# sudo dnf install elasticsearch
          Last metadata expiration check: 1:58:59 ago on Tue 08 Jan 2019 09:51:44 AM PST.
          Error:
           Problem: conflicting requests
            - nothing provides mvn(org.apache.lucene:lucene-analyzers-common:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-core:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-highlighter:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-join:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-memory:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-queries:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-queryparser:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-sandbox:4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-spatial:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
            - nothing provides mvn(org.apache.lucene:lucene-suggest:4.10.4) needed by elasticsearch-1.7.1-3.fc24.noarch
          
          JaredBuschJ 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @Donahue
            last edited by

            @Donahue That says other required pieces are not available. Not that elasticsearch was not available.

            1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch
              last edited by

              Which does not surprise me since it is from Fedora 24.

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch
                last edited by

                And that was hard to find.
                https://computingforgeeks.com/how-to-install-elasticsearch-6-x-on-fedora-29-fedora-28/

                Typo in my search text and everything...
                a29461f1-37de-4a39-a456-a901e24aea79-image.png

                1 Reply Last reply Reply Quote 0
                • DonahueD
                  Donahue
                  last edited by

                  I find it odd that the elasticsearch app is installed in NC, but the package is not on my machine.

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • DonahueD
                    Donahue
                    last edited by

                    I was able to get it installed using that link and also here: https://www.linode.com/docs/databases/elasticsearch/a-guide-to-elasticsearch-plugins/

                    After that, I can run the index and it picks up new documents. But it will not search them.

                    1 Reply Last reply Reply Quote 0
                    • DonahueD
                      Donahue
                      last edited by

                      It seems the search only works on files that are not shared.

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @Donahue
                        last edited by

                        @Donahue said in Nextcloud and Full Text Search:

                        I find it odd that the elasticsearch app is installed in NC, but the package is not on my machine.

                        Not really, nothing "in" NC shows up as a package on your machine. NC is its own thing, things inside of it would not be expected to be system packages.

                        1 Reply Last reply Reply Quote 0
                        • DonahueD
                          Donahue
                          last edited by

                          So to update this, searches do not seem to work in shared folders, but they will work in group folders which is an optional app. I also had to setup the backup job in NC to be a cron job and not an ajax job, and add it to the crontab for the apache user.

                          crontab -u apache -e
                          

                          I couldn't get the fulltextsearch:live to work properly, so I added fulltextsearch:index to the cron job too.

                          */15  *  *  *  * php -f /var/www/html/nextcloud/cron.php
                          */15  *  *  *  * php -f /var/www/html/nextcloud/occ fulltextsearch:index
                          
                          1 Reply Last reply Reply Quote 1
                          • 1 / 1
                          • First post
                            Last post