# `AshScylla.Search.Indexer.Deleter`
[🔗](https://github.com/ohhi-vn/ash_scylla/blob/main/lib/ash_scylla/search/indexer/deleter.ex#L1)

Removes a document from the inverted index.

Deletes all term entries for a post from both `search_post_terms`
and `search_post_fields`.

# `delete`

```elixir
@spec delete(module(), String.t(), String.t()) :: :ok | {:error, term()}
```

Deletes all index entries for a post across all fields.

First reads the terms from `search_post_fields` so we know which
partition keys to target for deletion in `search_post_terms`.
Then deletes from both tables.

Returns `:ok` on success or `{:error, reason}` on failure.

# `delete_field`

```elixir
@spec delete_field(module(), String.t(), String.t(), non_neg_integer()) ::
  :ok | {:error, term()}
```

Deletes all index entries for a specific field of a post.

---

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