Repository navigation
Releases
Releases · truespar/torque
Torque 0.7.0
Open source
- Torque is now open source. The server, Studio, the clients and the native segment builder are licensed under MIT OR Apache-2.0.
- Studio's Search Assistant runs on your own model. Set
ai_provider(anthropic, oropenaifor any OpenAI-compatible endpoint) andai_api_keyintorque.tomlor asTORQUE_AI_*. The assistant stays hidden until you set it and it only gets the collection's schema and never the documents. - The Go client is at
github.com/truespar/torque/clients/go:go getit instead of downloading an archive.
Upgrading
- Every collection has to be built again. Segment files are TQBF version 6, and files of any other version are not compatible. Rebuild the native segment builder and the .NET client together with the server. The server starts over older files and sets those collections aside: their searches answer 404 until they are built again, and
DELETE /collections/{name}removes them, which frees the name. - Data directories of earlier versions are not migrated.
overlay_flush_interval_msand--overlay-flush-interval-msare gone.- A document without a language is stemmed in the collection's
default_language, not in English.
Text search
- Text search is Torque's own implementation, so results and
text_matchdiffer from Typesense's. Every search parameter stays accepted with its documented meaning.text_matchis BM25F behind words matched, typos, completions and a field holding exactly the query; its values, and the order of equally good hits, are Torque's own. A search over any split of a collection's documents gives what one segment holding them gives. - Words. Only whitespace and
token_separatorssplit words; other punctuation is dropped from inside a word (non-stickis one word,nonstick). Letters of every script fold to ASCII, so "шипулин" finds "Шипулин" in any field, and every Unicode space splits words in any field. - Prefixes keep their accents ("trä" finds "trädgård", not "transport"; "tra" finds both), and find stemmed words as written.
max_candidatesdefaults to 4 at any collection size, as documented.- A
default_sorting_fieldstill sorts hits; it doesn't decide which candidate words are tried. - Snippets are the first match with
highlight_affix_num_tokenstokens on each side,...where cut. - A
"phrase"inqis checked against the stored text, so a phrase whose words many documents hold costs more than a plain search. prioritize_token_positionhas no effect, and neither does a field's or a synonym'slocale: tokenization is the same for every language.prefix=falsematches the last word of a multi-word query whole.
Name matching
name_matching, a field option for names. Aname_matchingfield's words are also found by their passport spelling ("Oedegaard" and "Ødegård") and by sound ("Mohammed" and "Muhamad"). The search parametername_matching(off,fallback,always, perquery_byfield) sets when.name_score=trueorders the firstname_score_candidateshits by how well their names match, parts paired in any order, with the evidence on each hit.name_score_kindtells people from organizations.explain_matches=truelists, per query word, the term it matched and how.
Realtime collections
- Writes are segments, made durable by a write-ahead log. A write is on disk before it is acknowledged, and a restart replays the log.
- Saves write what changed, and saved segments serve from their mapped files.
- Segments merge from their sections instead of decoding every document and building again.
- Collection info reports
realtime(memory_documents,deleted_documents,segments,last_flush_at,wal_bytes), with the metricstorque_memory_documentsandtorque_deleted_documents.
Performance
- 14 of the Studio benchmark's 15 queries are faster than on 0.6.3 (309K documents, the same machine): text search 1.98 ms to 0.70, facets 1.06 to 0.17, a filter on two fields 0.55 to 0.23. The 15th, a sort alone (0.14 to 0.16 ms), 0.6.3 answered wrongly. Against Typesense 30.1 the geometric mean is 16.5x at one client and 9.5x at 24, against Quickwit 0.8.2 13.3x and 8.0x.
- Nested AND filters on arrays of objects read the arrays' element sequences, not each document (836 ms to 4 ms on 1M documents); facets on arrays count by what costs less (11 ms to 0.3 ms); a filter and a sort on the same field no longer walk the values the filter leaves empty (9.6 ms to 1.4 ms).
- Every hit is written once: a response was copied whole to sort its keys.
- Ingest over TCP: 49K documents a second until every one is searchable, 7.7x Typesense's HTTP import.
Fixes
- String filters find documents of every language. A filter on a stemmed field missed the documents whose language is not the collection's:
category:=Electronicsfound none of the Swedish ones. The .NET client's fields are stemmed by default. highlightslists top-level fields only, as Typesense's first format does; a field inside an object is inhighlight./metricsstays bounded: requests count under the route they matched, and a deleted collection's series go with it.- A power loss, a crash or a failed write at any step of a change to the data directory leaves a state the server recovers: renames and removals are durable on Windows and Unix, and a collection whose files can't be read is set aside instead of being overwritten.
- A restart before a flush keeps every field of the documents it replays, those outside the schema too.
- An import no longer costs about 200 ms on Windows whatever its size.
facet_return_parentgives a parent for numbers and for fields in arrays of objects,max_facet_valueshas no cap, and a collection never written to answersfacet_bywith each facet field, empty.- Collection answers carry
default_sorting_field,token_separators,symbols_to_indexand, per field,locale,stem_dictionaryandstore.POST /collections,POST /keys,POST /configand a documentPOSTanswer 201. - A filter condition without a
:is a 400 before its field is looked up. - .NET client: searches of a
string[]field read their highlights. - The MCP server's search tool takes
prefixandnum_typosas JSON values or text. - The Docker image generates an API key.
macOS
- Apple silicon builds.
torque-0.7.0-aarch64-macos.tar.gzholds the server and the admin CLI, signed with a Developer ID and notarized by Apple. It needs macOS 13 or later.