Skip to content

Investigate using specialized field visitor when loading ignored source. #130886

@martijnvg

Description

@martijnvg

Today when reading stored fields in compute engine the https://github.com/elastic/elasticsearch/blob/31c2594bb96d47748b29ee923706312b01fd547e/server/src/main/java/org/elasticsearch/index/fieldvisitor/StoredFieldLoader.java#L208 gets used via:

this.visitor = new CustomFieldsVisitor(fields, loadSource);

This has a number of inefficiencies when loading ignored source for all documents that match the query. Like interacting with hash map / hash set / parsing id when a document is processed. This is ok in the context of the fetch phase in search api, however in the context of loading ignored source in esql not.

Image

Looks like ~10% can be improved here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions