Closed (fixed)
Project:
Search API Elasticsearch Attachments
Version:
8.x-7.0-alpha1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Jul 2020 at 14:54 UTC
Updated:
29 Aug 2022 at 19:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
robindh commentedHere's a patch with the updated dependency
Comment #3
robindh commentedSince the removal of mapping types in ES7 (https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-...), the
indexMapping()function throws an error on mapping import. This patch should fix it.Comment #4
robindh commentedFor some reason the ingest pipeline stops when encountering a document without attachment field.
This also prevents these documents from being indexed.
Adding
ignore_missing => TRUEto the pipeline config does prevent this though.Comment #5
slejnej commentedHi,
this patch can only be applied if you add plugins in specific order. For example we're already using connector 7 with ES7 and want to add the attachment indexing but not possible because composer complains about dependencies to connector 6.
Any idea when it is going to be released so we don't have to hack around cloning repos?
Thanks
Comment #6
morleman@gmail.com commentedHi,
Thanks for the patch robindh, as I was able to get past the mapping type removal now, however I still receive an error when enabling Attachments:
:{"type":"illegal_state_exception","reason":"[nested] nested object under path [es_attachment] is not of nested type"}}}]},"status":400} in Elasticsearch\Connections\Connection->process4xxError() (line 638 of /var/vamed-public/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php).Currently installed: Elasticsearch Server 7.4.0 w/ ingest attachments plugin , Elasticsearch Connector: 8.7.0-alpha3, Search API Elasticsearch Attachments 8.x-6.0-dev (w/ 3159624-4.patch)
-Had to manually add the patch to the files as had issues with git and composer... perhaps that did it?
Since the Elasticsearch 6.0 is unsupported November 20, 2020, will there be an update to Elasticsearch Attachments for ES 7?
Comment #7
Driss BENTOUNSI commentedHello,
As already mentioned in #5, i just hack around to install the module when you use ES7 and Elastic connector 8.7.
But even with this work around i have 3 issue :
When i enable Attachments.
Do you have any idea ? i cant downgrade to 6 as you know Elasticsearch 6.0 is unsupported
Thanks
Comment #8
robindh commentedHi, I must have missed #5 & #6 - I'll try to make some time later this week, to try and improve the patch.
I should add that I am not a maintainer for this module though, so I can't create a new branch / release even if the patch works.
I'll put the issue status back to 'needs work' for now
Comment #9
robindh commentedI've tested the patch more thoroughly now, using the following module versions:
Drupal core: v8.9.11
Search API: v1.18
Elasticsearch: v7.10.0
Elasticsearch ingest-attachment plugin: v7.10.0
Elasticsearch connector: v7.0-alpha3
Search API Elasticsearch Attachments: v8.6.0, using the patch in #4
I used a fresh drupal install, using the umami installation profile.
Indexing of attachments seems to work correctly for node & file datasources.
In the case of the node datasource; I added a media reference field on a node content type. The contents of media items (of bundle 'document') were added as es_attachment within each elasticsearch document. File datasource works out of the box. Files get indexed with their contents (also within the es_attachment field). Media datasource is not supported by default! To make this work, there is a patch included in this issue: https://www.drupal.org/project/search_api_elasticsearch_attachments/issu...
Adding a custom search implementation within a controller worked fine for me as well + the highlight processor is working.
I did notice that enabling the "Elasticsearch attachments" processor can throw this error:
This can be fixed by clearing the index via the UI, since index mappings will then be re-imported.
I did not encounter any of the errors posted above while testing; possibly there is an issue with a custom query / mapping alter that makes it incompatible with this module? I'd recommend trying to debug using kibana.
I'm moving the issue back to 'needs review', since the patch seems to work fine. Feedback / improvements are always welcome though!
Comment #11
ronaldmulero commentedWorks to index Content, Media, and attachments in Drupal 9 after applying these 3 patches:
* https://www.drupal.org/project/search_api_elasticsearch_attachments/issu...
* https://www.drupal.org/project/search_api_elasticsearch_attachments/issu...
* https://www.drupal.org/project/search_api_elasticsearch_attachments/issu...
Elasticsearch 7.4.2 with ingest-attachment plugin
Drupal 9.1.6
Elasticsearch Connector 8.x-7.0-alpha3
Search API 8.x-1.19
Search API Elasticsearch Attachments 8.x-6.0 (patched)
Comment #12
jlstreckerI also tested the latest patch successfully. I would mark this RTBC, except that it should probably go on a new 8.x-7.x branch. @dakku, could you create that branch?
I tested with the 8.x-6.x branch plus these changes:
I successfully indexed nodes with PDF attachments (no errors), and spot-checked a few to make sure they showed up in search results, on a site with:
Comment #13
olarin commentedI've committed these changes to a brand new 7.x branch and made an alpha release thereof.