# `Scrypath.Query`
[🔗](https://github.com/szTheory/scrypath/blob/v0.3.5/lib/scrypath/query.ex#L1)

**`%Scrypath.Query{}` is internal normalized query state** produced by the common search
path before a backend sees it. It is **not** a semver-stable pattern-match target for
application code—callers should build options as keywords for `Scrypath.search/3` and treat
this struct as an implementation detail behind `Scrypath.Meilisearch.Query` (or other
adapters).

# `facet_filter_t`

```elixir
@type facet_filter_t() :: keyword()
```

Per-attribute facet bucket filters (`facet_filter:` keyword).

# `facets_t`

```elixir
@type facets_t() :: [atom()]
```

Facet attribute names requested on the query.

# `filter_t`

```elixir
@type filter_t() :: keyword()
```

Meilisearch filter list after normalization (keyword of attribute predicates).

# `page_t`

```elixir
@type page_t() :: %{
  optional(:number) =&gt; pos_integer(),
  optional(:size) =&gt; pos_integer()
}
```

Normalized pagination: `:number` is the 1-based page index, `:size` is the page size cap.

# `sort_t`

```elixir
@type sort_t() :: keyword()
```

Meilisearch sort list after normalization (`[{attribute, direction}]`).

# `t`

```elixir
@type t() :: %Scrypath.Query{
  facet_filter: facet_filter_t(),
  facets: facets_t(),
  filter: filter_t(),
  page: page_t(),
  per_query: map(),
  sort: sort_t(),
  text: String.t()
}
```

Internal query bundle: full-text string plus normalized filter, sort, facet, and per-query
slices. Field shapes mirror allowlisted `Scrypath.search/3` options after validation.

# `new`

```elixir
@spec new(
  String.t(),
  keyword()
) :: t()
```

---

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