docs-site/content/27.0/api/README.md
This section of the documentation details all the API Endpoints available in Typesense and all the parameters you can use with them.
Use the links on the side navigation bar to get to the appropriate section you're looking for.
To learn how to install and run Typesense, see the Guide section instead.
This release contains important new features, performance improvements and bug fixes.
text_match_type mode called sum_score which sums the field-level text match scores to arrive at a document-level score.
enable_typos_for_alpha_numerical_tokens search parameter. Default: true.
turbo100, you can now set enable_typos_for_alpha_numerical_tokens: false as a search parameter.Deprecations / behavior changes section below.synonym_prefix
and synonym_num_typos parameters.
synonym_prefix: false and synonym_num_typos: 0.facet_strategy parameter.
facet_strategy for you based on some built-heuristics. But this flag now lets you explicitly control which strategy to use: exhaustive or top_values or automatic (default).include_fields search parameter, Eg: include_fields: $Collection_B(title, $Collection_A(title))sort_by of nested join fields. Eg: sort_by: $Collection_B( $Collection_A(price:asc) )filter_by and include_fields parameters.:= operation. For example, given filter_by: name:= S*.
we will match Steve Jobs but NOT Adam Stator.Search Parameters:
enable_synonyms boolean flag to enable/disable the application of synonyms during search (default: true).filter_curated_hits search parameter which allows you to customize filter behavior for pinned hits.enable_analytics that prevents the given query from being used for analytics aggregation.facet_return_parent search parameter.255 characters.Server-side improvements:
--filter-by-max-ops server-side flag that can customize the maximum number of operators that can be present
in a filter_by clause (default: 100).--max-per-page server-side flag that increases the number of hits that can be fetched within a single page. Default: 250./config API with the cache-num-entries key.AI Search:
api_key parameterhmm).API Endpoints:
include_fields and exclude_fields in the single document fetch (GET /collections/x/documents/id) end-point.GET /collections API endpoint now respects the collections allowed in the API key associated with the request.exclude_fields in the GET /collections API end-point. This is useful when you have a lot of fields which bloats the payload.Performance:
enable_lazy_filter boolean parameter is enabled._eval() along with hybrid search.flat_search_cutoff parameter of vector search that returned suboptimal results._eval operation that caused a rare crash.k returned docs.precision parameter was used.store field property in collection schema response.range_index and stem field properties._vector_query parameter in sort_by clause being treated as a sorting field.return_id not being returned in import API response during failures.Conversational Search:
To address some limitations that we found with the previous design of the conversational search feature, we now use a Typesense collection for storing the conversation history.
During upgrade, we will attempt to create a
default collection with the name ts_conversation_history_model_id and migrate existing conversations
to this collection.
However, given the edge cases we found and have now fixed with the new approach on multi-node Highly Available clusters, this automated migration may not work: if it does not, please refer to the guide on how to re-create the conversation model.
Exhaustive total_values in facet stats
We refactored the faceting data structures to improve efficiency. This had an impact on how the total_values in
facet_stats is computed for low-cardinality facet fields: it's now computed only within the
results returned, instead of on the whole dataset.
To get an accurate total_values for the entire dataset, send this additional search parameter:
{
"facet_strategy": "exhaustive"
}
This will force Typesense to compute facets in an exhaustive manner and allows the total_values key in the response to be exact.
Before upgrading your existing Typesense cluster to v{{ $page.typesenseVersion }}, please review the behavior changes above to prepare your application for the upgrade.
We'd recommend testing on your development / staging environments before upgrading.
If you're on Typesense Cloud:
If you're self-hosting Typesense, here's how to upgrade:
To upgrade a multi-node cluster, we will be proceeding node by node to ensure the cluster remains healthy during the rolling upgrade.
NOTE: During the upgrade, we have to ensure that the leader of the cluster is using the older Typesense version.
So we will upgrade the leader last. You can determine whether a node is a leader or follower by the value of the state
field in the /debug end-point response.
| State | Role |
|---|---|
| 1 | LEADER |
| 4 | FOLLOWER |
/health should return healthy).If you wish to downgrade back to an earlier version of Typesense server, you can safely downgrade to either v26 or v0.25.x.
:::tip This documentation itself is open source. If you find any issues, click on the Edit page button at the bottom of the page and send us a Pull Request. :::
<RedirectOldLinks />