# Search messages and chats by words or meaning (/en/docs/search)

Find messages, agreements, people, chats and documents across your chats. Learn what you can search, how to choose a search method and how to check the source messages, even when you remember only part of a phrase or its subject.

**What you can search:**

- **Messages and discussions** — by text, sender, date, subject and nearby messages.
- **Contacts and people** — by name, username or ID, then recall what you discussed.
- **Chats, groups and channels** — by title among your account's chats.
- **Files** — by filename, extension and contents, once the document's text has been extracted and saved.
- **Links and attachments** — for example, messages with a link, PDF or voice note; voice transcripts become searchable once their text is saved.

Content search supports text files, Word and PDFs with text layers. Scans and photos need text
recognition first; ask your agent to do that. Details: [Telegram files](/llms.mdx/docs/tg/search/content.md#text-inside-files)
and [MAX](/llms.mdx/docs/max/search/content.md#%D1%82%D0%B5%D0%BA%D1%81%D1%82-%D0%B2%D0%BD%D1%83%D1%82%D1%80%D0%B8-%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2). See [People](/llms.mdx/docs/people/content.md) for finding a person.

For word forms, typo handling and meaning-based search, see [How search works](/llms.mdx/docs/search-architecture/content.md).

Which kinds of content are indexed, and what each one needs (a command, a model or a setting): [What gets indexed](/llms.mdx/docs/what-is-indexed/content.md).

**On this page:**

1. [Fetch the relevant chat history first](#fetch-the-relevant-chat-history-first)
2. [Search everything at once](#search-everything-at-once)
3. [Search CRM deals and keep work apart](#search-crm-deals-and-keep-work-apart)
4. [Find a word or phrase](#find-a-word-or-phrase)
5. [When you don't remember the exact wording](#when-you-dont-remember-the-exact-wording)
6. [Narrow the conversation](#narrow-the-conversation)
7. [Choose the command](#choose-the-command)
8. [Narrow first, then search](#narrow-first-then-search)
9. [The operators](#the-operators)
10. [Words, forms and meaning](#words-forms-and-meaning)
11. [Page through the results](#page-through-the-results)
12. [Keep the output small](#keep-the-output-small)
13. [Read the evidence, then widen](#read-the-evidence-then-widen)
14. [Recipes](#recipes)
15. [Common mistakes](#common-mistakes)
16. [If a result is missing](#if-a-result-is-missing)
17. [Try it with sample messages](#try-it-with-sample-messages)
18. [Build a Lucene query](#build-a-lucene-query)
19. [Check the result](#check-the-result)
20. [More precise queries and technical details](#more-precise-queries-and-technical-details)
21. [Search pages](#search-pages)

## Fetch the relevant chat history first [#fetch-the-relevant-chat-history-first]

Before searching older messages, download the conversations for the period you need. Logging
in does not download all history. Word search can also query the messenger’s server by default: `tg` asks Telegram for word candidates, and so does `max` with MAX: within the chat you name, or across all chats with one best match from each. `--backend archive` keeps word searches local. Topic search and counts use saved messages. File filters are evaluated against the local archive, even when a word search also retrieves server candidates. If that conversation is missing, an empty result does not mean the
message was never sent.

Ask your agent to fetch the selected chats or run your messenger's command. Replace `Project`
with the chat title; this example downloads the past month, up to 1,000 messages per run:

```sh
tg personal messages sync "Project" --since-time 30d --limit 1000
```

```sh
max personal messages sync "Project" --since-time 30d --limit 1000
```

If the limit is reached, that month's history may still be incomplete. Instructions for fetching,
resuming and checking history: [Telegram](/llms.mdx/docs/tg/archive/content.md#fetch-a-chats-history) and
[MAX](/llms.mdx/docs/max/archive/content.md#%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C-%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D1%8E).

## Search everything at once [#search-everything-at-once]

When you do not know where something was written — a chat or your own notes — search both together:

```sh
tg personal search all invoice
max personal search all invoice
```

Each result says whether it is a message or a note. `tg` and `max` do not search mail: `memo search mail`
does, and `memo search all invoice` searches messages, mail and notes at once. The next sections, from
[search CRM deals](#search-crm-deals-and-keep-work-apart) on, search one kind.

## Search CRM deals and keep work apart [#search-crm-deals-and-keep-work-apart]

`memo search all` also finds the deals and leads a CRM tool such as [`b24`](/llms.mdx/docs/b24/usage/content.md) stored, by the words of
their title. `--only crm` searches them alone:

```sh
memo search all 'renewal' --only crm
```

People and companies are not in `search all`. Find them with `memo search people` and `memo organizations list`.
A deal outside the CRM account's [sync scope](/llms.mdx/docs/people/content.md#whose-deals-are-copied) is not found either.

An agent that uses memo's MCP server sees in `search all` only what its [permissions](/llms.mdx/docs/memo/configuration/content.md#permissions)
let it list. When the server denies `deals.list` or `leads.list`, those hits are left out, and the answer says so in an
issue for `crm`. `crm.list` leaves the whole CRM part out, and `business.list` leaves out invoices, payments, orders,
contracts, subscriptions, products and wallets. `--only crm` and `--only business` search one part alone, and are
refused when that part is denied. These permissions do not limit a search you run yourself in a terminal.

```sh
memo search all 'renewal' --only business
```

A question about who someone is, or how a person, a company and a deal relate, is better answered from their
context than from search. Ask your agent to work in this order:

1. Find the one record: `memo search people`, `memo organizations list` or `memo deals list`.
2. Read its context: `memo context person:<id>`, `memo organizations context <ref>` or
   `memo deals context <ref> --brief`.
3. Follow only the relationships the question needs, for example
   `memo relationships list kind:reports-to 'to:"person:12"'`.
4. Search for the evidence after that, with `memo search all`.
5. Cite the references, and name every gap the answer lists under "Not read". A `reported` relationship is only
   the CRM's word.

[Clients, colleagues and deals](/llms.mdx/docs/people/content.md#clients-colleagues-and-deals) shows these answers with examples.

### Groups of accounts [#groups-of-accounts]

A group keeps your work accounts apart from your personal ones. With no group named, a run reads every account:
that is the group `all`, which always exists and never leaves anything out. `personal`, `work` and any other group
are groups you save yourself. Put the CRM account and your work mailbox in `work`, then name the group first, and
the run reads only its accounts:

```sh
memo groups add work bitrix24:example.bitrix24.com
memo groups add work email:owner@northstar.example
memo groups add personal telegram:100
memo groups add personal email:owner@northstar.example
memo groups list
memo work search all 'renewal'
```

An account can be in two groups. `memo groups list` shows each saved group, then `all`, and marks every account that
another group holds too. Duplicates are allowed, and the list ends with them. It also shows each account's profile
names in every tool, such as the profile `work` in tg and in b24, once those tools have run. A profile named like a group is only
a suggestion and never puts an account in that group.

```text
$ memo groups list
work
  bitrix24:example.bitrix24.com
  email:owner@northstar.example  also in personal
personal
  telegram:100
  email:owner@northstar.example  also in work
all
  bitrix24:example.bitrix24.com  all  also in work
  email:owner@northstar.example  all  also in work, personal
  google-calendar:owner@northstar.example  all
  telegram:100  all  also in personal
duplicate: email:owner@northstar.example is in work, personal
```

`memo groups remove personal email:owner@northstar.example` takes the mailbox out of `personal`, so it is no longer
a duplicate, and `all` still reads it. `memo groups move telegram:100 personal work` moves an account in one write:
first the account, then the group it leaves, then the group it joins. A group you never saved does not exist: a run
that names it is refused, and the answer lists your groups and the profiles named like it. After the first sync of a
CRM account that no saved group lists, the sync's answer suggests `memo groups add work` with that account. `MEMO_GROUP=work` works like the first word for every command. `--source personal` means
your own messenger accounts and not the group `personal`.

A group narrows the messages, mail, calendar events, CRM records and people a run reads. What you make yourself in
`memo` belongs to no account, so it is in every group: your notes, projects, tasks, invoices, memories and facts.
`memo work search all 'renewal'` finds the deal and the mail, and `memo personal search all 'renewal'` finds only the
mail.

A run that names no group still reads every account. To keep an agent inside one group, start its `memo` with
`MEMO_GROUP_LOCK`, for example `MEMO_GROUP_LOCK=work memo mcp serve`. Under the lock, memo refuses the messages,
mail, calendar events, CRM records and people of accounts outside the group. It also refuses another group,
`--source all`, an account outside the group and a change to the groups, and the agent cannot lift the lock. A
command that cannot keep to a group is refused as a whole, so the lock fails closed:

```text
$ MEMO_GROUP_LOCK=work memo messages show msg:telegram/100/201/1
{"error":{"code":"permission_error","reason":"access.denied","message":"this process is locked to group work (MEMO_GROUP_LOCK) — msg:telegram/100/201/1 belongs to an account outside it","details":{"reference":"msg:telegram/100/201/1"},"retry":{"safe":false}}}

$ MEMO_GROUP_LOCK=work memo personal search all renewal
{"error":{"code":"permission_error","reason":"access.denied","message":"this process is locked to group work (MEMO_GROUP_LOCK) — group \"personal\" (first word) is refused","retry":{"safe":false}}}
```

What the group holds still answers. Alice's context under the lock reads only the CRM account and counts the
accounts it kept out without naming them. Memories and facts leave out evidence and sources outside the group and
say how many they left out. `memo relationships list` leaves out a row whose end only an outside account saw. Your
own tasks stay visible:

```text
$ MEMO_GROUP_LOCK=work memo context person:3
Alice  person:3
...
Business
Organizations
  Acme Ltd  organization:1  member-of contact (Procurement manager) reported by bitrix24:example.bitrix24.com
...
Not read: other accounts — 2 outside group work
Read: bitrix24:example.bitrix24.com

$ MEMO_GROUP_LOCK=work memo tasks list project:ATLA
ATLA-1 · open · chore · ATLA · Follow up on the Acme renewal
```

Which commands run under the lock: [Lock an agent to a group](/llms.mdx/docs/memo/mcp/content.md#lock-an-agent-to-a-group).

## Find a word or phrase [#find-a-word-or-phrase]

Start by asking your agent. For MAX, write “max CLI” instead of “tg CLI”:

```text prompt
Use tg CLI. Find where we agreed the renovation deadline in the group and my chat with the contractor. Show the final agreement, check later replies and cite the messages. If history is missing, tell me what needs fetching. Don't send anything.
```

You should get the agreed date and the messages behind it. If the date was only proposed or later changed, the answer should make that clear. You do not need to know the search syntax.

<details>
<summary>Optional: commands for the terminal</summary>

```sh
tg personal search messages invoice
max personal search messages invoice
```

</details>

For an exact phrase, keep the quotes inside the query:

<details>
<summary>Optional: commands for the terminal</summary>

```sh
tg personal search messages 'exact:"final invoice"'
max personal search messages 'exact:"final invoice"'
```

</details>

Results link back to messages. Ask your agent to show nearby messages before interpreting
an agreement: one line may miss a correction or a later answer.

## When you don't remember the exact wording [#when-you-dont-remember-the-exact-wording]

Message search offers several approaches:

- **A word or exact phrase:** when you remember the wording. Use `exact:` for literal matching.
- **Part of a word:** `flat*` finds words starting with that part, such as “flat” and “flats”.
- **Word forms and shared stems:** “invoice” can find “invoices”. Which forms match depends on the archive's language settings.
- **Typos:** the default search does not correct typos. Ask your agent to allow misspellings: it can add `--discover`, which also tries close spellings of the words in the local archive, or search by the start of the word.
- **Meaning:** when you remember the subject, such as “the renovation deadline we agreed”, rather than the words. This needs a prepared discussion index.

Word forms, exact matching, indexes and meaning-based search: **[How search works](/llms.mdx/docs/search-architecture/content.md)**.
Detailed syntax: [Telegram](/llms.mdx/docs/tg/query-language/content.md) and [MAX](/llms.mdx/docs/max/query-language/content.md). The `--discover` option is listed in the command references for [Telegram](/llms.mdx/docs/tg/commands/content.md#tg-search-messages) and [MAX](/llms.mdx/docs/max/commands/content.md#max-search-messages). These modes describe message search;
chat-title and person-name lookup can behave differently.

## Narrow the conversation [#narrow-the-conversation]

<details>
<summary>Optional: commands for the terminal</summary>

```sh
tg personal search messages 'invoice chat:"Project"'
max personal search messages 'invoice chat:"Project"'
```

</details>

You can also filter by person, date or attachments. The [Telegram](/llms.mdx/docs/tg/search/content.md) and
[MAX](/llms.mdx/docs/max/search/content.md) guides give examples you can adapt.

## Choose the command [#choose-the-command]

You have a lot stored, and an agent pays for every result it reads. This page shows how to get the right records in the fewest steps: pick the command, narrow before you search, page through results and trim the output. After it, you can turn a vague question into one precise search and check what the search covered. It assumes the history you need is already downloaded: [Searching](/llms.mdx/docs/search/content.md#fetch-the-relevant-chat-history-first).

Put the tool name and your profile name in front of each command, as in `tg personal search messages`.

| You want | Run | Notes |
| --- | --- | --- |
| Words in your Telegram or MAX messages | `search messages` in `tg` or `max` | Reads the local archive and, by default, the messenger's server |
| A phone, email, link or person's name written in messages | `search messages` with `phone:`, `email:`, `domain:` or `mentions:`, or `mentions list` | Found by rules, in any spelling |
| Everything about one person, in every messenger | `contacts events` | Needs the identities linked with `contacts link` |
| A discussion, when you remember the subject and not the words | `search conversations` | Needs `conversations rebuild` and `conversations embed` once for the chat |
| A picture by what it shows | `search messages "dog on a beach"` | English only, and the picture setting must be on: [What gets indexed](/llms.mdx/docs/what-is-indexed/content.md#pictures) |
| Mail, notes, or you do not know where it was written | `memo search all`, `memo search mail`, `memo search notes` | The answer lists the sources it skipped and why |
| Messages of every messenger at once | `memo search messages` | Messages only |
| A decision or a promise | `memo facts list` | Each fact links to its evidence |
| A Drive document, by words or meaning | `drive search` | `--exact` for words only |
| A Drive file, by name, type, folder, person or tag | `drive catalog list` or `drive catalog search` | Metadata only, works offline |

## Narrow first, then search [#narrow-first-then-search]

A search that names a chat, a sender and a period reads fewer records and returns fewer wrong ones. Add filters in this order: chat, sender, date, kind, attachment, then the words.

| Filter | Finds | Example |
| --- | --- | --- |
| `chat:` | One chat, by name or id | `chat:"Book club"` |
| `from:` | One sender | `from:"Kai Sample"` |
| `date:` | A period, or everything after a day | `date:[2026-01-01 TO 2026-02-01}`, `date>=2026-10-01` |
| `kind:` | Private chats, groups, channels, bots | `kind:group` |
| `has:` | Messages with a file, photo, voice note, link or text | `has:file` |
| `filename:` | A file by its name | `filename:*.pdf` |
| `mime:` | A file by its type (Telegram only) | `mime:"application/pdf"` |
| `size:` | Files by size | `size>10MB` |
| `content:` | Words inside a file | `content:invoice` |
| `transcript:` | Words said in a voice note | `transcript:invoice` |
| `tag:` | Your own labels | `tag:work` |
| `phone:`, `email:`, `url:`, `domain:`, `mentions:` | A value found in the text | `phone:"+1 555 010 0100"`, `mentions:"person:7"` |

Field names are case sensitive, and an unknown field is an error, not an empty answer. The full list of fields is in the query language of [Telegram](/llms.mdx/docs/tg/query-language/content.md) and [MAX](/llms.mdx/docs/max/query-language/content.md). The last row is in the latest releases of `tg` and `max`.

```sh
tg personal search messages 'chat:"Book club" from:"Kai Sample" date>=2026-10-01 delivery' --limit 10
```

When the messenger's own server is asked too, only the words, one chat, one sender and the dates go to it. `has:`, `tag:`, negations and wildcards are applied locally. Details: [How search works](/llms.mdx/docs/search-architecture/content.md#server-search-beside-the-archive).

## The operators [#the-operators]

| Write | Meaning |
| --- | --- |
| `invoice paid` | Both words, in any order (AND is the default) |
| `alpha OR beta` | Either word |
| `alpha NOT beta`, `alpha -beta` | The first word without the second |
| `+alpha` | The word must be there |
| `(alpha OR beta) gamma` | A group |
| `from:(alice OR bob)` | One field for several values |
| `date:[2026-01-01 TO 2026-02-01}` | A range: `[ ]` includes the end, `{ }` excludes it |
| `invo*` | Any ending |
| `text:/pass(port)?/` | A regular expression, matched against whole words |

Three rules prevent most surprises:

- A query that is only a negation selects nothing. Pair it with a positive condition: `has:photo NOT has:text`.
- An explicit `AND` binds tighter than `OR`. `alpha OR beta gamma` means `(alpha OR beta) AND gamma`.
- `and`, `or` and `not` in lower case are ordinary words. Typos such as `invoice~1` and boosts such as `invoice^2` are errors.

## Words, forms and meaning [#words-forms-and-meaning]

A plain word finds its other forms: "invoice" finds "invoices". For the exact form only, use `exact:invoice`. Search does not correct typos: use the part you are sure of (`invoi*`), or add `--discover` to also try close spellings in the local archive. Words inside files and transcripts match the exact form only.

Use `search conversations` when you remember what a discussion was about and not which words were used. Ask in your own words, in any language the model reads. It always returns the nearest conversations, even when none of them answers, so open the messages before you rely on one. For an exact name, number or id, use a field search instead. More: [Topic search](/llms.mdx/docs/tg/topic-search/content.md).

## Page through the results [#page-through-the-results]

The answer says whether more results exist (`has_more`). That describes the page, not whether the messenger holds more. Repeat the same command with the same filters and ask for the next page. Which flag does it depends on the command:

| Command | Next page |
| --- | --- |
| `search messages` in `tg` and `max` | `--page <n>`, counting from 1 |
| `contacts events` | `--cursor <cursor>`, with the cursor from the answer's `page.next` |
| `mentions list`, `drive catalog list`, `drive catalog search` | `--page <n>` |
| `memo search notes`, `drive search` | `--offset <n>` |
| `memo search all`, `memo search mail`, `memo search messages` | `--limit` only, up to 100: narrow the query instead |

## Keep the output small [#keep-the-output-small]

- `--limit <n>` caps the hits.
- `--json=<fields>` keeps only the fields you name, for example `--json=ref,date,text`. It is the one option that
  shrinks every answer: 31% to 64% smaller than full `--json` in [our measurement](https://github.com/WireCatLabs/cli-testing/tree/main/performance/agents/output-size).
- `--jsonl` prints one result per line. It is no smaller than `--json`. `--full` returns whole texts.
- `--max-output-bytes` caps machine output at 4 MiB by default. A result over the cap fails visibly instead of being cut.
- `--context <n>` adds `n` neighbouring messages on each side of a hit. It is 0 when the output is not a terminal.

## Read the evidence, then widen [#read-the-evidence-then-widen]

Open one hit with its neighbours, or follow its reply chain:

```sh
tg personal messages context "msg:telegram/1/77/42" --before-n 3 --after-n 3
tg personal messages context "msg:telegram/1/77/42" --thread
```

If an answer looks thin, read its `missing` entry. It names what was not searched and the step that fixes it, such as downloading a chat. Each hit says where it matched (`matched_in`: `text`, `transcript`, `filename` or `file`). To compare the count with what you expect, `stats messages show` (in the latest releases) counts matches by chat, sender, day or hour.

## Recipes [#recipes]

Replace the names with yours.

| Goal | Command |
| --- | --- |
| An agreement and its source | `tg personal search messages 'chat:"Book club" agreed date>=2026-10-01' --limit 5` |
| Everything about one person this month | `tg personal contacts events "Kai Sample" 'at>=2026-10-01'` |
| Where a phone number appears | `tg personal search messages 'phone:"+1 555 010 0100"'` |
| Files sent in a chat last week | `tg personal search messages 'chat:"Book club" has:file date>=2026-10-07'` |
| What a Drive document says about a topic | `drive personal search 'budget' --exact --limit 5` |

For longer ones, see the recipes for [Telegram](/llms.mdx/docs/tg/recipes/content.md) and [MAX](/llms.mdx/docs/max/recipes/content.md).

## Common mistakes [#common-mistakes]

| Mistake | What happens | Instead |
| --- | --- | --- |
| Searching before the history is downloaded | Few or no results | Download the chat first; read `missing` in the answer |
| Reading an empty answer as "never sent" | The archive may be incomplete | Check what the answer says it covered |
| Quoting a phrase to get the exact form | Quotes match any word form | `exact:"final invoice"` |
| `mime:application/pdf` without quotes | The `/` starts a regular expression | `mime:"application/pdf"`, or `filename:*.pdf` |
| `mime:` in MAX | MAX does not report file types | `filename:*.pdf` |
| `has:photo` to find what a picture shows | It only says a photo is attached | Picture search, in English |
| A message field in a Drive search | Drive has its own filters | `tag:` and `--exact`, or `catalog list` |
| `From:` instead of `from:` | An error | Field names are lower case |
| Asking a picture search in another language | The model knows English only | Have your agent translate first |

## If a result is missing [#if-a-result-is-missing]

By default, word search can also ask Telegram’s or MAX’s server. Topic search,
counts and filters such as files or links need saved history: fetch the missing period, then
search again. A word search is different from a search by meaning; try both when you remember
only roughly how something was said. Check dates, chat scope and whether history is complete.

## Try it with sample messages [#try-it-with-sample-messages]

Practise combining filters and checking sources before connecting an account. This playground contains 50 fictional messages in 6 chats, runs on your device and never connects to a messenger. The sample messages are in English: try `invoice`, `budget` or `coffee`.

1. Start with a word or choose a filter.
2. Narrow the results by person, chat, date or attachment type.
3. Open a match to read its context, then change a filter and compare the results.

Sample dates run from two days before today to two days after it and use UTC. Type a field such as `has:` or `in:` to see its values. Press Space after a word or completed filter to see fields and operators; use ↑ / ↓ and Enter to insert a suggestion, or Esc to close it. Clear the query or choose **All** to browse every message.

The interactive playground runs only in a browser: https://wirecat.dev/en/docs/search

## Build a Lucene query [#build-a-lucene-query]

Lucene syntax combines words with fields and logical operators. Start with `invoice`, then add conditions to narrow the result. Use uppercase `AND`, `OR` and `NOT`, and parentheses to make the grouping clear.

| Query | What it finds |
| --- | --- |
| `invoice AND budget` | Messages containing both words. |
| `Atlas AND (invoice OR budget)` | Atlas messages containing either invoice or budget. |
| `invoice NOT has:file` | Invoice messages without a file attachment. |
| `"final invoice"` | The words together, in that order. |
| `text:cof*` | Words starting with `cof`, including coffee. |
| `text:*off*` | Words containing `off`, such as coffee or office. `?` replaces one character. |
| `chat:"Client studio" AND from:Mia` | Messages from Mia in Client studio. Quote names containing spaces. |
| `in:max AND has:voice` | Voice notes from a selected messenger. Choose a messenger from the `in:` suggestions. |

`text:coffee` finds the word coffee. `text:cof` searches for the whole word cof, so it does not match coffee; add `*` when you only remember part of a word.

`has:` also offers `attachment`, `link`, `file`, `photo`, `image`, `video`, `audio`, `sticker`, `contact`, `location` and `poll`. `has:attachment` includes attached media; `has:link` finds links in the message text. You can combine them: `(has:file OR has:link) AND text:budget`.

Choose **Date** for today's date, the current month or the five-day sample window. The inserted query uses `date:YYYY-MM-DD` for a day or `date:[START TO END]` for an inclusive range. An asterisk leaves one end open; braces exclude the boundary. For example, the **Before tomorrow** suggestion uses `date:{* TO YYYY-MM-DD}` with tomorrow's date.

This playground implements the supported WireCat Lucene fields, rather than every Apache Lucene feature. Fuzzy matching (`~`), boosting (`^`) and fields such as `filename:` are unavailable here. An unfinished or unsupported query keeps the previous valid results visible and marks the problem; it does not silently broaden the search.

## Check the result [#check-the-result]

Open the source of the best hit and compare it with what you remembered. If a kind of content never turns up, check the one step it needs: [What gets indexed](/llms.mdx/docs/what-is-indexed/content.md#what-each-kind-needs). If a link between records is missing, see [How things are linked](/llms.mdx/docs/how-things-are-linked/content.md#if-a-link-is-missing).

Next: the query language of [Telegram](/llms.mdx/docs/tg/query-language/content.md) or [MAX](/llms.mdx/docs/max/query-language/content.md) lists every field, preset and date form.

## More precise queries and technical details [#more-precise-queries-and-technical-details]

Learn filters and operators in the [Telegram query guide](/llms.mdx/docs/tg/query-language/content.md) or
[MAX query guide](/llms.mdx/docs/max/query-language/content.md). [How search works](/llms.mdx/docs/search-architecture/content.md)
explains indexing, conversations and ranking after the practical guides.

For the general grammar, read the official [Apache Lucene query parser syntax](https://lucene.apache.org/core/10_5_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html). WireCat's references define which features work in the tools. The [search architecture guide](/llms.mdx/docs/search-architecture/content.md) explains how message search, conversation graphs and embeddings fit together.

## Search pages [#search-pages]

- [What gets indexed](/llms.mdx/docs/what-is-indexed/content.md): what can be found and what each kind of content needs.
- [How things are linked](/llms.mdx/docs/how-things-are-linked/content.md): how messages, people, files, notes and tasks connect.
