> ## Documentation Index
> Fetch the complete documentation index at: https://docs.conare.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Conare's API is at https://api.conare.ai. Authenticate with `Authorization: Bearer $CONARE_API_KEY`.
> The full OpenAPI spec is at https://api.conare.ai/openapi.yaml; each endpoint has a page under /api-reference, and appending .md to any page URL returns its Markdown.
> Embed with model conare-embed-1; send input_type "query" for search queries. Rerank with conare-rerank-1.
> Prefer the TypeScript SDK (`npm install conare`) or plain HTTP in examples.
> Install the Conare skill with `npx skills add https://docs.conare.ai`; search these docs over MCP at https://docs.conare.ai/mcp; the whole site is at https://docs.conare.ai/llms-full.txt.

# フィルター

> 等価、$in、範囲、$and、$or の演算子で、検索や削除をドキュメントのメタデータで絞り込みます。テキスト、数値、日付の比較ルールも説明します。

[検索](https://docs.conare.ai/ja/query.md)または[削除](https://docs.conare.ai/ja/documents.md#まとめて削除する)に `filter` としてフィルターを渡すと、[メタデータ](https://docs.conare.ai/ja/write.md#メタデータ)でドキュメントを照合できます。

```json theme={null}
{ "team": "support", "year": { "$gte": 2024 } }
```

並べたキーはすべて一致する必要があります。

## 演算子

| 演算子 | 一致条件 |
| - | - |
| `{ "key": value }`, `$eq` | 値と等しい。配列の場合はその値を含む |
| `$in` | リスト内のいずれかの値と等しい |
| `$ne`, `$nin` | 値、またはリスト内のどの値とも等しくない（検索のみ） |
| `$gt`, `$gte`, `$lt`, `$lte` | より大きい、以上、より小さい、以下 |
| `$and`, `$or` | フィルターのリストのすべて、またはいずれか |

## 例

| フィルター | 一致対象 |
| - | - |
| `{ "tags": "billing" }` | `tags` 配列に `billing` を含むドキュメント |
| `{ "lang": { "$in": ["en", "de"] } }` | 英語またはドイツ語のドキュメント |
| `{ "$or": [{ "team": "support" }, { "year": { "$in": [2024, 2025] } }] }` | support のドキュメント、または 2024 年か 2025 年のドキュメント |
| `{ "published_at": { "$gte": "2025-06-01" } }` | 2025 年 6 月 1 日以降に公開されたドキュメント |
| `{ "file_id": "report.pdf" }` | 1 つの[アップロード済みファイル](https://docs.conare.ai/ja/files.md) |
| `{ "file_id": "report.pdf", "page": 3 }` | そのファイルの 3 ページ目 |

## ルール

| ルール | |
| - | - |
| 等価 | テキストとして比較します。`3`、`3.0`、`"3"` は互いに一致します |
| 範囲 | 数値は数値と、文字列は文字列とバイト単位で比較します。日付は 1 つの形式の ISO 8601 で書きます（`2025-06-01` または `2025-06-01T10:00:00Z`） |
| 範囲で使えないもの | ブール値、配列の要素、222 バイトを超える文字列 |
| キーがない場合 | そのキーを持たないドキュメントは `$ne` と `$nin` に一致します |
| 否定 | ほとんどのドキュメントを除外する否定では、結果が `top_k` より少なくなることがあります |
| サイズ | 最大 256 条件、ネストは 8 階層まで。`$and`、`$or`、複数値の `$in` はそれぞれ 1 つと数えます |
| リスト | `$in` と `$nin` は最大 255 個の値を受け付けます |
| 不明なキー | チェックされません。キーのスペルを間違えると何にも一致しません |
| エラー | 無効なフィルターは `400 invalid_filter` を返します |


## Related topics

- [ドキュメントの取得、一覧表示、削除](https://docs.conare.ai/ja/documents.md)
- [クイックスタート](https://docs.conare.ai/ja/quickstart.md)
- [ドキュメントを書き込む](https://docs.conare.ai/ja/write.md)
- [ソース](https://docs.conare.ai/ja/sources.md)
- [turbopuffer API](https://docs.conare.ai/ja/turbopuffer.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.