Search sessions and page through history
Session search finds a chat again from something you remember, and a long conversation loads its older messages as you read back. This page covers what a search returns, the rules a query must meet, and the sizes and refusals behind history paging. Where search opens and how the reading view works are covered in Session search and history paging.
What a search covers
- A search looks through the chats your list shows at that moment. A chat that is still blank, or that has no folder yet, is left out of the list, so it is not searched (Sessions: list and lifecycle covers when a chat appears).
- A chat with several versions is read as the version it is showing (Conversation branches).
- Hits come from your messages and Oda's answers in a conversation.
- A search reads stored records and starts no work in the chats it looks through.
What a search returns
- Up to 20 chats, one result each. A chat that matches in several places appears once, and the repeats do not use up more places.
- Each result carries a short piece of the matching message, cut to at most 240 Unicode code points, so a symbol such as an emoji is never split in half.
- When more chats match than the results hold, the results say so; make the query more specific to see the others.
What a query must meet
- Not empty. A blank query, or one that holds only spaces, is refused with
session search query must not be empty.
- At most 500 UTF-16 code units. An ordinary character counts as one, and a symbol such as most emoji counts as two. A longer query is refused with
session search query must contain at most 500 UTF-16 code units.
- No NUL characters. A NUL is an invisible character that can ride along in copied text. A query that contains one is refused with
session search query must not contain NUL.
- Oda checks a query before it searches, so a refused query runs no lookup.
When a search stops early
- Cancelled. A search that is stopped before it finishes reports
session search was aborted. A cancellation wins even when another problem happens at the same moment. Run the search again if you still need it.
- Failed. Something goes wrong sometimes, and Oda reports the failure with the detail it has. Try again, and if it keeps failing, contact your DataMind OS administrator with the message and what you searched.
- Beyond the budget. All the lookups one search needs share a budget of 100. If a search needs more than the budget, it stops with a failure instead of returning part of the results. Make the query more specific and try again.
- Not in every setup. A setup without chat search reports that search is not available instead of running it.
Reading back through a chat
- A chat opens at its newest messages, and older ones arrive as you read back, so a long chat never loads all at once.
- Older messages load in pages of up to 50 messages. A message here is one you sent or an answer from Oda.
- Moving straight to an earlier point loads through it in larger steps, up to 200 messages at a time.
- The newest page marks the chat's last position. That mark is how Oda can tell where the chat ends, so a request for a point past it can be refused instead of filled in.
- Pages loaded behind the newest one bring messages only; the chat's current state block travels with the newest page.
- Pages are cut at message boundaries: the entries a message refers to travel on the page that carries the message.
When history cannot load
- Past the end. A request for a point the chat has not reached is refused with
session page through seq <n> is past cursor <n>; nothing is filled in for it.
- A page that fails validation. A page request names a position and a whole number of messages; a request that fails validation is refused before anything is read.
- Not found. A chat whose stored record cannot be found, or a stored record without its folder, is refused as not found (
session/not-found) rather than guessed at.
- A helper chat. A helper chat Oda started is read through its parent link; a request whose parent or mode does not match the helper chat's record is refused (
subagent/unauthorized).
How an open chat stays in step
- When a view of a chat opens, it starts from one snapshot that carries the chat's current position; live entries arrive after it, in order.
- An empty chat opens with an empty page rather than a failure.
- After a reconnect, the view takes a fresh complete snapshot before later live entries, so nothing is glued across the break.
- If the live feed is missing a part, Oda refuses to show the history with a hole in it (
session event stream skipped seq <n>) and loads the missing part again.
Questions, answered
Which chats does a search look through?
The chats your list shows at that moment. A chat that is still blank, or that has no folder yet, is not in the list, so it is not searched, and a chat with versions is read as the version it is showing. A search reads stored records, so it starts no work in the chats it looks through.
What does a search match inside a chat?
Your messages and Oda's answers. A chat that matches in several places still arrives as one result, with a piece of one matching message.
Why did my search come back empty?
Either nothing in the chats your list shows matches, or there was nothing to search: chats that are still blank or have no folder are left out. Try a different word, and make sure the chat you have in mind is in your list.
Why was my query refused when it looks short?
The limit of 500 counts UTF-16 code units, not characters: an ordinary character counts as one, and a symbol such as most emoji counts as two. A query built from a few hundred emoji can pass 500 units, so shorten it and search again.
Why can a search fail instead of returning partial results?
All the lookups one search needs share a budget of 100. If a search needs more than that, it stops with a failure rather than returning part of the results. Make the query more specific and try again; if it keeps failing, contact your DataMind OS administrator.
Why did loading an older page get refused?
A page can only be served up to the chat's latest entry: a request for a point the chat has not reached is refused with session page through seq <n> is past cursor <n>, and nothing is filled in for it. A page request that fails validation, such as a page size that is not a whole positive number, is refused before anything is read.
Can a page cut a message in half?
No. Pages are cut at message boundaries, and a message means one you sent or an answer from Oda; the other entries that belong to a message ride on the page that carries it.
Why did my open chat reload its history?
After a reconnect, the view starts from a fresh snapshot of the chat's position before later live entries, and when the live feed is missing a part, Oda refuses to show the history with a hole in it and loads the missing part again. A reload means Oda is rebuilding a complete history, not losing one.