Problem/Motivation

When removing an entity which for some reason is not indexed in Elasticsearch, the following entry is logged in Drupal:

Could not delete document "3" from "example-multilingual-lv" Elasticsearch index due to the following error: 404 Not Found: {"_index":"example-multilingual-lv","_id":"3","_version":3,"result":"not_found","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":13,"_primary_term":1}

While this information might be helpful in general, in some situations these messages are not desired, for example, when entities are generated and removed automatically via an integration.

Steps to reproduce

1. Create a node.
2. Install Elasticsearch Helper and enabled an index plugin (without content re-indexing).
3. Remove the node.
4. See that the 404 message from Elasticsearch is logged.

Proposed resolution

Provide an option to enable silent document removal (without logging).

Comments

maijs created an issue. See original summary.

maijs credited rudins.

maijs’s picture

Title: An error is logged if document is not found in the index » Do not log an entry in watchdog if document is not found in the index

  • maijs committed 5805e153 on 8.x authored by rudins
    Issue #3381460 by maijs, rudins: Do not log an entry in watchdog if...

  • maijs committed 084574b6 on 8.x-7.x authored by rudins
    Issue #3381460 by maijs, rudins: Do not log an entry in watchdog if...
maijs’s picture

Status: Active » Fixed
maijs’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.