nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch_elasticsearch
GNU Affero General Public License v3.0
82 stars 32 forks source link

java.lang.IllegalArgumentException: field [content] not present as part of path [attachment.content] #95

Closed chagwood closed 4 years ago

chagwood commented 4 years ago

When indexing files with the command: sudo -u www-data php occ fulltextsearch:index I get a lot of these errors:

Error:     13/13
Index: files:33226
Exception: Elasticsearch\Common\Exceptions\ServerErrorResponseException
Message: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [content] not present as part of path [attachment.content]

I have spot-checked some of the files using the command sudo -u www-data php occ fulltextsearch:document:platform files 818 and I will get results such as this:

{
    "document": {
        "id": "818",
        "providerId": "files",
        "access": {
            "ownerId": "akeogh",
            "viewerId": "",
            "users": [],
            "groups": [],
            "circles": [],
            "links": []
        },
        "modifiedTime": 0,
        "title": "2018-2019 Art Teacher Planner Mod Squad Black\/._Print Release.pdf",
        "link": "",
        "index": null,
        "source": "files_local",
        "info": [],
        "hash": "8500f1c19e73cc5f1e7bacef9da860a6",
        "contentSize": 0,
        "tags": [],
        "metatags": [
            "files_local"
        ],
        "subtags": [],
        "more": [],
        "excerpts": [],
        "score": ""
    }
}

They seem to be mostly PDFs. Some of them are under 1MB and only a page.

Running a test using sudo -u www-data php occ fulltextsearch:test comes back with no issues.

Here is the curl result:

{
  "name" : "node-1",
  "cluster_name" : "nextcloud",
  "cluster_uuid" : "rM9lxIwwR_yhUTzchz_eAw",
  "version" : {
    "number" : "6.8.6",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "3d9f765",
    "build_date" : "2019-12-13T17:11:52.013738Z",
    "build_snapshot" : false,
    "lucene_version" : "7.7.2",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

I'm running Nextcloud 17.0.2 with "Full text search", "Full text search - Elasticsearch Platform" and "Full text search - Files" apps

dmuensterer commented 2 years ago

Did you manage to find what the problem was?