Typesense

Latest version: v0.19.0

Safety actively analyzes 621239 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

0.25.1

This release fixes some important bugs identified in the recently released `v0.25.0`. So we highly recommend upgrading to it.

Bug Fixes

- Handle mismatched vector dimensions during indexing
- Allow remote embedders to use multiple per-collection credentials
- Fixed altering of schema involving embedding fields
- Fixed charset in content-type header of export API response
- Fixed an issue in analytics query aggregation that caused crash on empty collections
- Fixed group by on vector search
- Improved error handling of remote embedding APIs
- Fixed tokenizer of embedding models that use XLM-RoBERTa
- Fixed upsert of unchanged docs containing embedding fields, that would cause the embedding field value to be removed
- Fixed text match score calculation to consider the presence of dropped tokens when ranking

Upgrade

Before upgrading your existing Typesense cluster to `v0.25.1`, please review the behavior changes above to prepare your application for the upgrade.

- For self-hosted Typesense deployment, please refer to the important upgrade section of the [0.25.1 documentation](https://typesense.org/docs/0.25.1/api/#upgrading). This particular version requires a specific set of upgrade steps especially for multi-node clusters.
- For Typesense Cloud, visit your [clusters page](https://cloud.typesense.org/clusters), click on the cluster you want to upgrade, click on "Cluster Configuration" on the right pane, then "Modify", pick `0.25.1` and schedule a time for your upgrade.

Downgrade

Once you upgrade to `v0.25` of Typesense Server the internal structure of the data directory becomes incompatible with older versions of Typesense (`v0.24`).

However, if you need to downgrade to `v0.24`, we've released a special version `v0.24.2` that backports these data structure changes back to `v0.24` while keeping other `v0.24.1` features as is.

So `v0.25` can only be downgraded to `v0.24.2`.

But `v0.25.1` can be downgraded to `v0.25.0`.

Documentation

View the complete API documentation for this release here: [https://typesense.org/docs/0.25.1/api/](https://typesense.org/docs/0.25.1/api/)

0.25.0

This release contains exciting new features and important bug fixes.

New Features

- **Semantic Search:** Search for conceptually related terms in your dataset, even if the exact keyword does not exist in your dataset.
- [Demo](https://hn-comments-search.typesense.org) | [Docs](https://typesense.org/docs/0.25.0/api/vector-search.html#semantic-search)
- **Hybrid search:** Combine both keyword and semantic / vector search results in a single query using rank fusion
- [Demo](https://hn-comments-search.typesense.org) | [Docs](https://typesense.org/docs/0.25.0/api/vector-search.html#hybrid-search)
- **Automatic embedding generation:** specify one or more string fields that should be used for generating embeddings during indexing & during search using
state-of-the-art embedding models, optionally [using a GPU](https://typesense.org/docs/0.25.0/api/vector-search.html#using-a-gpu-optional).
- [Example](https://github.com/typesense/showcase-hn-comments-semantic-search/blob/0a10f2ef34e01e79049e7ba42ae8660e80cf524f/scripts/indexDataInTypesense.js#L32-L45) | [Docs](https://typesense.org/docs/0.25.0/api/vector-search.html#using-built-in-models)
- **Integration with OpenAI API, PaLM API and Vertex AI API:** Have Typesense automatically make API calls to remote embedding services like OpenAI / Google, to generate vectors for the JSON data you index in Typesense.
- [Example](https://github.com/typesense/showcase-hn-comments-semantic-search/blob/0a10f2ef34e01e79049e7ba42ae8660e80cf524f/scripts/indexDataInTypesense.js#L49-L67) | [Docs](https://typesense.org/docs/0.25.0/api/vector-search.html#using-openai-api)
- **Query Analytics:** Typesense now supports aggregation of popular search queries which can then be used as insights into query patterns. [Docs](https://typesense.org/docs/0.25.0/api/analytics-query-suggestions.html)
- **Query Suggestions:** You can use historical search terms collected by the Query Analytics feature, to power Query Suggestions.
- [Docs](https://typesense.org/docs/0.25.0/api/analytics-query-suggestions.html#query-suggestions)
- **Update Documents by Query:** You can now update all documents that match a `filter_by` condition
- [Docs](https://typesense.org/docs/0.25.0/api/documents.html#update-by-query)
- **Range faceting:** numerical values can be dynamically faceted at query-time by bucketing them into ranges.
- [Docs](https://typesense.org/docs/0.25.0/api/search.html#faceting-parameters)
- **Pagination using `offset` and `limit`**: This is in addition to the existing `page` and `per_page` mechanism. This new pagination method offers more flexibility and is also useful for GraphQL compatibility.
- [Docs](https://typesense.org/docs/0.25.0/api/search.html#pagination-parameters)

Enhancements

- Resolve field names using wildcard: fields can now be resolved in `facet_by`, `query_by`, `include_fields`, `exclude_fields`,
`highlight_fields` and `highlight_full_fields` when a wildcard expression is used, e.g. `title_*` will match `title_en`.
- Ability to sort grouped hits based on the size of each group, using `sort_by: _group_count:desc`.
- A count is returned for total number of records under each group even if the hits are truncating via `group_limit`.
- The `!=` filtering operation can now be performed against numerical fields. Previously only string fields were supported for this operator.
- Support use of `preset` parameter in embedded API key.
- Support nested dynamic fields.
- Migrated build system to Bazel.
- New server configuration option (`--reset-peers-on-error`) that makes the cluster forcefully refresh its peers when an
unrecoverable clustering error happens due to sudden change of peer IPs. There's also an equivalent
`/operations/reset_peers` API. Be careful while using this option, as it can lead to transient loss of data.

Bug Fixes

- Fixed updates of nested object field values.
- Fix geopoint indexing in nested fields.
- Fixed some special characters not getting highlighted properly in prefix searches.
- Fixed a bug in phrase matches on array.
- Fixed a socket leak on followers of a cluster when import data fails validation.
- Fixed high memory usage incurred in export/import of large datasets.
- Fixed bad unicode characters in export.
- Fixed errors that were caused by presence of bad Japanese unicode characters in import.
- Fixed broken http/2 support on CURL v8.
- Fixed non-curated members of a group appearing in curated override results.
- Fixed override query rule being case-sensitive.
- Fixed phrase search not considering field weights.

Deprecations / behavior changes

There are no depreciation or behavior changes in this version.

Upgrade

Before upgrading your existing Typesense cluster to `v0.25.0`, please review the behavior changes above to prepare your application for the upgrade.

- For self-hosted Typesense deployment, please refer to the important upgrade section of the [0.25.0 documentation](https://typesense.org/docs/0.25.0/api/#upgrading). This particular version requires a specific set of upgrade steps especially for multi-node clusters.
- For Typesense Cloud, visit your [clusters page](https://cloud.typesense.org/clusters), click on the cluster you want to upgrade, click on "Cluster Configuration" on the right pane, then "Modify", pick `0.25.0` and schedule a time for your upgrade.

Downgrade

Once you upgrade to `v0.25` of Typesense Server the internal structure of the data directory becomes incompatible with older versions of Typesense.

However, if you need to downgrade to `v0.24`, we've released a special version `v0.24.2` that backports these data structure changes back to `0.24` while keeping other `0.24.1` features as is.

So `v0.25` can only be downgraded to `v0.24.2`.

Documentation

View the complete API documentation for this release here: [https://typesense.org/docs/0.25.0/api/](https://typesense.org/docs/0.25.0/api/)

0.24.1

This release fixes some important bugs identified in the recently released `v0.24.0`. So we recommend updating to it.

Bug Fixes

- Improved memory footprint of export API.
- Fixed an edge case in deletion of deeply nested fields.
- Fixed weighting of fields in phrase search.
- Handle `NaN` values for geo filter query.
- Fixed indexing of nested geopoint array values.
- Added validation for vector dimensions during indexing.
- Fixed highlighting when both flat/nested form of field is present.
- Fixed an edge case with phrase match on array.
- Fixed an edge case in fuzzy search typo correction.
- Allow null values for optional nested fields.
- Enabling exhaustive search should automatically drop tokens.
- Don't remove empty array of object elements for highlight.
- Restrict the `id` from being a default sorting field.

Download

Please download the appropriate binary archive for your operating system and architecture here: https://typesense.org/downloads/

**NOTE:** The new version is also available on [Typesense Cloud](https://cloud.typesense.org/). If you're already using Typesense Cloud, please reach out to us to have your cluster upgraded to `v0.24.1`.

Upgrade

Before upgrading your existing Typesense cluster to `v0.24.1`, please review the changes above to prepare your application for the upgrade.

- ⚠️ For self-hosted Typesense deployment, please refer to the important upgrade section of the [0.23 documentation](https://typesense.org/docs/0.24.1/api/#upgrading).
- For Typesense Cloud, email us at `contacttypesense.org` and we can do an in-place upgrade for you.

0.24.0

This release contains new features, performance improvements and important bug fixes.

New Features

- **Indexing of nested object fields**: feature must be enabled via the `enable_nested_fields`
option during collection creation.
- **Cross-field OR and complex filter expressions**: a filter query like
`is_premium: true || (price:> 100 && category: shoes)` is now possible.
- **Vector search**: support for both exact & HNSW-based approximate vector searching.
- **Multi-lingual support**: Chinese, Japanese, Korean, Cyrillic and Thai are now supported via the use of field-level
`locale` flag in the collection schema.
- **Optional filtering**: `sort_by` clause can now accept an expression whose result is used for sorting, e.g.
`sort_by=_eval(brand:nike):desc,_text_match:desc`.
- **Preset search configurations**: manage your search query parameters by storing them within Typesense as a "preset",
that you can refer to during query time. This helps in keeping the query parameters hidden away from public view.

Enhancements

- New `text_match_type` parameter that allows you to customize how multi-field text relevancy score is computed.
- Improve performance of large collection deletions.
- Ability to clone a collection schema (without documents), overrides and synonyms.
- New highlight structure that mimics the original document structure. Nested fields are highlighted only in this new
structure, which is returned in a key named `highlight` in the JSON response.
- Allow override rules to be processed past the first match via the `stop_processing` flag (default is `true`).
- Support locale and symbols in synonyms via the `locale` and `symbols_to_index` options during synonym creation.
- Allow cloning of collection schema & linked assets (like synonyms, overrides) from a reference collection.
- Support query replacement action in an override via the `replace_query` option.
- Support an override to be active with a given time window via the `effective_from_ts` and `effective_to_ts` options.
- Support `filter_by` rule in overrides.
- New `--skip-writes` flag for starting Typesense in a mode that does not read writes from the Raft log. This is
useful when the server has crashed due to some recent bad writes that you want to skip over temporarily.
- New `--memory-used-max-percentage` and `--disk-used-max-percentage` flags for preventing writes when a specified
memory/disk threshold is breached.
- Allow the imported documents and their `id`s to be returned in the import response via
the `return_doc` and `return_id` options.
- API for compacting the on-disk database via the `POST /operations/db/compact` end-point.

Bug Fixes

- Fixed some edge cases with schema alteration.
- Fixed a race condition in parallel collection creation that manifested on localhost, especially on Mac.
- Fixed an edge case in highlighting involving non-ASCII unicode characters.
- Fixed sort by string not accounting for accented characters.
- Fixed an edge case in numerical facet field values not being fully removed on deletion.
- Fixed HTTPS POST body buffering removing genuine trailing white space in the chunked payload in some cases.
- Fixed float field validation to handle scientific notation.
- Fixed a bug involving exact filter match on array.
- Fixed a few edge cases that showed up in super-large documents that contained greater than 64,000 tokens.
- Implemented automatic log rotation for RocksDB info logs. Previously, one had to restart the server for truncation or
perform external truncation via `logrotate`.

Deprecations / behavior changes

- The default value for `search_cutoff_ms` is now `30000`, i.e. 30 seconds. If you wish to allow searches to run
longer than that, you can pass a higher value as a search parameter.
- Disable text match score bucketing, if there are more buckets than the number of results found. Previously, results
were being aggregated into a single score.
- The older `highlights` key in the response is deprecated (but is still returned for now). Use the new `highlight`
object in the response for highlighting information.
- The `text_match` key in the response is deprecated (but is still returned for now) in favor of the
new `text_match_info` object that returns fine grain matching information, including the score.

Upgrade

Before upgrading your existing Typesense cluster to `v0.24.0`, please review the behavior changes above to prepare your application for the upgrade.

- For self-hosted Typesense deployment, please refer to the important upgrade section of the [0.24.0 documentation](https://typesense.org/docs/0.24.0/api/#upgrading). This particular version requires a specific set of upgrade steps especially for multi-node clusters.
- For Typesense Cloud, visit your [clusters page](https://cloud.typesense.org/clusters), click on the cluster you want to upgrade, click on "Modify Configuration" on the right pane and schedule a time for your upgrade. Alternatively, you can also email `supporttypesense.org`.

0.23.1

This release contains a few enhancements and bug fixes identified in [v0.23.0](https://github.com/typesense/typesense/releases/tag/v0.23.0) which we thought are important enough to warrant a patch release. If you're using v0.23.0, we recommend upgrading.

Bug Fixes

- Fixed a potential crash caused by attempting to alter the `id` field.
- Fixed synonym queries not respecting the `prefix` setting.
- Fixed a rare bug present in exact filtering of string arrays.
- Fixed a race condition in slow request logging that led to a crash under high concurrency.
- Better validation of regular expression used in API key collection allow list.
- ARM builds now work on more ARM processors (previously worked only on Graviton instances)

Enhancements

- Improved filtering performance, upto 5x-10x faster when querying a small subset on large datasets
- Support for `sort_by` parameter in override rule.
- Allow word position in a field value to be used a ranking signal via the `prioritize_token_position` search parameter.
- Improved stability in rotation of geographically distributed clusters having a large dataset.

Download

Please download the appropriate binary archive for your operating system and architecture here: https://typesense.org/downloads/

**NOTE:** The new version is also available on [Typesense Cloud](https://cloud.typesense.org/). If you're already using Typesense Cloud, please reach out to us to have your cluster upgraded to v0.23.1.

Upgrade

Before upgrading your existing Typesense cluster to v0.23.1, please review the changes above to prepare your application for the upgrade.

- ⚠️ For self-hosted Typesense deployment, please refer to the important upgrade section of the [0.23 documentation](https://typesense.org/docs/0.23.1/api/#upgrading).
- For Typesense Cloud, email us at `contacttypesense.org` and we can do an in-place upgrade for you.

0.23.0

This release contains new features, performance improvements and important bug fixes.

New Features

- Phrase search: wrap keywords in a query with double quotes to search them as a phrase, e.g. `"new york"`.
- Schema changes: we now support fields to be added or dropped from a collection schema in-place.
- Improved multi-field matching: much better performance and accuracy when query keywords have to be matched across
multiple fields in a document.
- Infix searching: find string within strings, which is useful for entities like model number or email address.
- Allow string fields to be sorted: sorting on string fields can be enabled by setting `sort: true` parameter of the field.

Enhancements

- Improved update and delete performance of numerical fields by 10x.
- Emplace mode for imports: using the `emplace` action creates a document if it does not exist in a collection
or updates it (partially or fully) if it already exists.
- Treat space as typo: search for `basket ball` if `basketball` is not found or vice-versa. You can disable this behavior
by setting `split_join_tokens: false`.
- Improved Cyrillic support: better highlighting and fuzzy search for fields configured with:
`el`, `ru`, `sr`, `uk` and `be` locales.
- ARM compatibility: an ARM build is now published for every release.
- Each multi-search query can have an independent `x-typesense-api-key` key. This is useful to specify different scoped search API keys for each search.
- Control the number of words that Typesense considers for typo and prefix searching via the `max_candidates` parameter.
- CORS can now be enabled for a specific set of domains using the `--cors-domains` flag.
- Search results are now highlighted by prefix, rather than the full world.
Previously, searching for "app" will highlight the full word "apple" in the results, but now it will only highlight the "app"le prefix within the word.
- "Remove Matched Tokens" can be used by itself in Overrides. So you can now setup rules like, if query contains "word", remove "word" from the search query.
- Ability to toggle if filters should by applied to overrides or not using the `filter_curated_hits` flag.
- Ability to hide `out_of` and `search_time_ms` from the search API response, using the `exclude_fields` parameter.
- Ability to control typo tolerance for facet queries using `facet_query_num_typos`.
- Ability to specify which subnet to use for peering using `--peering-subnet` server parameter.

Bug Fixes

- Fixed exact match of synonym query candidates not being ranked correctly.
- Fix glibc incompatibility on recent Linux distros (Ubuntu 21.04+). [531](https://github.com/typesense/typesense/issues/531)
- Fixed the `snippet` containing the full field value when `highlight_full_fields` is enabled.
- Fixed `--enable-cors=true` flag format not working. Earlier, only the `--enable-cors` format worked.
- Fixed exact match for repeated words (when searching for repeated words such as "Boom Boom"). [427](https://github.com/typesense/typesense/issues/427)
- Fixed `highlight_fields` parameter not respecting `include_fields`. [556](https://github.com/typesense/typesense/issues/556)
- Fixed document ids that are accepted with space char (%20) but cannot be deleted later. [574](https://github.com/typesense/typesense/issues/574)
- Improved highlighting of text containing punctuations. [528](https://github.com/typesense/typesense/issues/528)
- Fixed case sensitivity of facet fields. [504](https://github.com/typesense/typesense/issues/504)

Deprecations / behavior changes

- In prefix queries, only the prefix part of a word in the result is highlighted now, instead of the whole word.
For e.g. given a query like "new y", the result will be highlighted as `<mark>New Y</mark>ork City`.

Download

Please download the appropriate binary archive for your operating system and architecture here: https://typesense.org/downloads/

**NOTE:** The new version is also available on [Typesense Cloud](https://cloud.typesense.org/). If you're already using Typesense Cloud, please reach out to us to have your cluster upgraded to v0.23.0.

Upgrade

Before upgrading your existing Typesense cluster to v0.23.0, please review the behavior changes above to prepare your application for the upgrade.

- For self-hosted Typesense deployment, please refer to the important upgrade section of the [0.23.0 documentation](https://typesense.org/docs/0.23.0/api/#upgrading). This particular version requires a specific set of upgrade steps especially for multi-node clusters.
- For Typesense Cloud, visit your [clusters page](https://cloud.typesense.org/clusters), click on the cluster you want to upgrade, click on "Modify Configuration" on the right pane and schedule a time for your upgrade. Alternatively, you can also email `supporttypesense.org`.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.