> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# ES Mixin

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py#L0")

# module `es_mixin`

Mixin class containing Lineage specific methods

To be used by OpenMetadata class

## **Global Variables**

* **ES\_INDEX\_MAP**

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py#L38")

## class `ESMixin`

OpenMetadata API methods related to Elasticsearch.

To be inherited by OpenMetadata

***

#### handler es\_get\_queries\_with\_lineage

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py#L82")

### method `es_search_from_fqn`

```python theme={null}
es_search_from_fqn(
    entity_type: Type[~T],
    fqn_search_string: str,
    from_count: int = 0,
    size: int = 10,
    fields: Optional[str] = None
) → Optional[List[~T]]
```

Given a service\_name and some filters, search for entities using ES

**Args:**

`entity_type`: Entity to look for

`fqn_search_string`: string used to search by FQN. E.g., service.\*.schema.table

`from_count`: Records to expect

`size`: Number of records

`fields`: Comma separated list of fields to be returned

**Returns:**

List of entities

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py#L151")

### method `get_query_with_lineage_filter`

```python theme={null}
get_query_with_lineage_filter(service_name: str) → str
```

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py#L139")

### method `get_reindex_job_status`

```python theme={null}
get_reindex_job_status(job_id: str) → Optional[EventPublisherResult]
```

Method to fetch the elasticsearch reindex job status

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py#L124")

### method `reindex_es`

```python theme={null}
reindex_es(config: CreateEventPublisherJob) → Optional[EventPublisherResult]
```

Method to trigger elasticsearch reindex

***
