string
Plain text, such as a name, a note or a message.
At a glance
- Stored as: the value itself, written inline wherever it is used.
- Read in parts: by a range of lines.
- Edited by: replacing text (
old/new). - Search: by passage, so full-text and similarity search rank a value by its best passage.
Writing
Write the text itself, as a JSON string. It is kept exactly as written, line breaks included; nothing is normalized.
Written as
A JSON string whose schema format is string.
Reading
get_content reads a text by its lines, numbered from 1:
rangereturns those lines verbatim, such as[40, 120]or"40-120". A read longer thanmax_charsstops at a whole line and ends with therangethat continues it.querysearches the text.grepmatches lines exactly, and also as a case-insensitive regular expression when the query looks like one, withcontextlines around each match.bm25ranks by words,similarityby meaning andhybridby both.matchhas a model check the passages, for "find every ..." questions, and costs model calls.- A text has no parts to address, so
pathis refused.
A long text shown by its handle, as a tool result is, starts with a map when it has one. A Markdown
document shows its outline: each heading with the line range that reads its section. A text without
headings, such as a transcript, shows its parts, each with its lines and how it begins. Every line number
you are shown is one that range takes.
Querying
A field of this type has a full-text index and is split into passages for search by meaning, so every
search operator works on it, as do =, like and regular expressions on the whole value. match.text is
the passage that matched, and <field>.size.chars the length of the text. See the
HQL reference.
Document | lines ~~ "opening hours" | select id, name, match.text | limit 10
Party | display_name ilike "%lee%" | select id, display_name
Editing
edit replaces text with old and new. old must occur exactly once, unless you
set replace_all, and an old that is not found is refused. The result is a new value under a new
handle. JSON Pointer ops are refused: a text has no structure.
Operations
Through the dtypes resource: