Add a Views field that displays an Elasticsearch document field

Created on 25 November 2024, 2 months ago

Problem/Motivation

Current Source field Views field plugin is able to display values only from the _source value in the Elasticsearch document.

The is no way to display other Document values like _index or _id.

Proposed resolution

Create a Views field plugin that is able to display any field from the Elasticsearch document.

Feature request
Status

Active

Version

8.0

Component

Code

Created by

🇱🇻Latvia maijs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @maijs
  • 🇱🇻Latvia maijs

    A patch is attached which adds the elasticsearch_document_field Views field plugin.

    1. The elasticsearch_document_field Views field plugin is able to display any field from the Elasticsearch document. To show the values from the _source element, the field configuration should have _source prefix before the field, e.g., _source.title.
    2. The elasticsearch_source Views field plugin is deprecated. It now extends the elasticsearch_document_field with minor changes to ensure the backwards compatibility.
    3. Unit tests are added to over both elasticsearch_document_field and elasticsearch_source Views field plugins.
Production build 0.71.5 2024