# `Strongbox.Query`
[🔗](https://github.com/hattoriai/strongbox/blob/v0.1.0-dev/lib/strongbox/query.ex#L1)

Looking records up by a blind index.

# `where_index`

```elixir
@spec where_index(Ecto.Queryable.t(), atom(), term()) :: Ecto.Query.t()
```

Narrows `queryable` to the records whose blind index `field` holds
`value`, under any index key of the vault, so lookups keep working while
index keys rotate.

    User
    |> Strongbox.Query.where_index(:email_index, "Jose@Example.com ")
    |> Repo.one()

The value is normalized as the index normalizes. With `:bytes`, an
index matches some other values too: check the decrypted value of what
comes back.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
