# Add the dictionary to the indexer

You can improve the performance of the indexation part by using a dictionary endpoint instead of targeting directly the blockchain to get data. Under the hood, the Dictionary provides a list of relevant block heights containing the specific events and extrinsics.

*Example*: If you look at a createNft event, not every block will contain this event since it depends on users' usage of the Ternoa chain. When looking at events, the dictionary will provide the list that contains the createNft event we are looking for instead of every event of each block.

* You can see in [**our repository**](https://github.com/capsule-corp-ternoa/ternoa-subql/blob/mainnet/project.yaml) what is the dictionary endpoint and how to add it.

**Code snippet example:** look at line 7

```yaml
...
  schema:
    file: ./schema.graphql
  network:
    genesisHash: '0x6859c81ca95ef624c9dfe4dc6e3381c33e5d6509e35e147092bfbc780f777c4e'
    endpoint: wss://mainnet.ternoa.network
    dictionary: https://dictionary-mainnet.ternoa.dev/
  dataSources:
    - kind: substrate/Runtime
      startBlock: 1
      mapping:
        file: "./dist/index.js"
        handlers:
          - handler: handleEvent
            kind: substrate/EventHandler
            filter:
              module: balances
              method: Transfer
...
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ternoa.network/getting-started/javascript-sdk/ternoa-indexer/dictionary/add-the-dictionary-to-the-indexer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
