API version: 0.3.0

---

# Exact indices

The intent `exact` makes the exact value of a property searchable: lookups by value, ranges and sorting. It is
available for `boolean`, `integer`, `number`, `string`, `datetime` and `elementId` properties.

| Database      | Index                                                                                                                                           |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Neo4j         | range index, for properties stored in Neo4j                                                                                                     |
| MongoDB       | ascending index, for properties stored in MongoDB and [nested properties](/reference/indices.md#nested-properties)                              |
| Elasticsearch | a `keyword` field for strings (only if named, a `string` without intent maps text and keyword), the native field of numbers, booleans and dates |

`exact` covers range queries as well: in Neo4j it is a range index, which serves comparisons (`<`, `>`, `BETWEEN`) and
sorting, in Elasticsearch numbers, dates and keywords are mapped in a way which supports range queries natively. There
is no separate intent for ranges. Composite indices and other settings are available as
[raw Neo4j indices](/reference/indices/raw-indices/neo4j.md), indices which the schemas did not create are never touched.
Elasticsearch settings of a single property can be given with
[`elasticsearch`](/reference/indices/raw-indices/elasticsearch.md).

```json
{
  "type": "integer",
  "index": "exact"
}
```

Long strings are not part of the `keyword` field of Elasticsearch: it ignores values of more than 256 characters, so
they can not be found by their exact value there. A string with only `exact` for `elasticsearch` has no `text` field
either, its long values are therefore not searchable in Elasticsearch at all. See the
[limits of strings](/reference/schemas/types/string.md#limits).

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Indices](/reference/indices.md)

Next: [Fulltext indices](/reference/indices/fulltext.md)
