---
title: "Retrieves a preset."
method: GET
path: "/presets/{presetId}"
tags: ["presets"]
---

# Retrieves a preset.

`GET /presets/{presetId}`

Retrieve the details of a preset, given it's name.

## Path parameters

- `presetId` string, required

## Response `200`

Preset fetched.

- PresetSchema
  - `value` union, required
    - SearchParameters
      - `q` string — The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by.
      - `query_by` string — A list of `string` fields that should be queried against. Multiple fields are separated with a comma.
      - `validate_field_names` boolean — Controls whether Typesense should validate if the fields exist in the schema. When set to false, Typesense will not throw an error if a field is missing. This is useful for programmatic grouping where not all fields may exist.
      - `nl_query` boolean — Whether to use natural language processing to parse the query.
      - `nl_model_id` string — The ID of the natural language model to use.
      - `query_by_weights` string — The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma.
      - `text_match_type` string — In a multi-field matching context, this parameter determines how the representative text match score of a record is calculated. Possible values are max_score (default) or max_weight.
      - `prefix` string — Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true.
      - `infix` string — If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results
      - `max_extra_prefix` integer — There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match.
      - `max_extra_suffix` integer — There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match.
      - `filter_by` string — Filter conditions for refining your open api validator search results. Separate multiple conditions with &&.
      - `max_filter_by_candidates` integer — Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*.
      - `sort_by` string — A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc`
      - `facet_by` string — A list of fields that will be used for faceting your results on. Separate multiple fields with a comma.
      - `max_facet_values` integer — Maximum number of facet values to be returned.
      - `facet_query` string — Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe".
      - `num_typos` string — The number of typographical errors (1 or 2) that would be tolerated. Default: 2
      - `page` integer — Results from this specific page number would be fetched.
      - `per_page` integer — Number of results to fetch per page. Default: 10
      - `limit` integer — Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10.
      - `offset` integer — Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter.
      - `group_by` string — You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field.
      - `group_limit` integer — Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3
      - `group_missing_values` boolean — Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true
      - `include_fields` string — List of fields from the document to include in the search result
      - `exclude_fields` string — List of fields from the document to exclude in the search result
      - `highlight_full_fields` string — List of fields which should be highlighted fully without snippeting
      - `highlight_affix_num_tokens` integer — The number of tokens that should surround the highlighted text on each side. Default: 4
      - `highlight_start_tag` string — The start tag used for the highlighted snippets. Default: `<mark>`
      - `highlight_end_tag` string — The end tag used for the highlighted snippets. Default: `</mark>`
      - `enable_highlight_v1` boolean — Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true
      - `enable_analytics` boolean — Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script).
      - `snippet_threshold` integer — Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30
      - `synonym_sets` string — List of synonym set names to associate with this search query
      - `drop_tokens_threshold` integer — If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10
      - `drop_tokens_mode` 'right_to_left' | 'left_to_right' | 'both_sides:3' — Dictates the direction in which the words in the query must be dropped when the original words in the query do not appear in any document. Values: right_to_left (default), left_to_right, both_sides:3 A note on both_sides:3 - for queries up to 3 tokens (words) in length, this mode will drop tokens from both sides and exhaustively rank all matching results. If query length is greater than 3 words, Typesense will just fallback to default behavior of right_to_left
      - `typo_tokens_threshold` integer — If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100
      - `enable_typos_for_alpha_numerical_tokens` boolean — Set this parameter to false to disable typos on alphanumerical query tokens. Default: true.
      - `filter_curated_hits` boolean — Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
      - `enable_synonyms` boolean — If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true
      - `synonym_prefix` boolean — Allow synonym resolution on word prefixes in the query. Default: false
      - `synonym_num_typos` integer — Allow synonym resolution on typo-corrected words in the query. Default: 0
      - `pinned_hits` string — A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
      - `hidden_hits` string — A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
      - `curation_tags` string — Comma separated list of tags to trigger the curations rules that match the tags.
      - `highlight_fields` string — A list of custom fields that must be highlighted even if you don't query for them
      - `split_join_tokens` string — Treat space as typo: search for q=basket ball if q=basketball is not found or vice-versa. Splitting/joining of tokens will only be attempted if the original query produces no results. To always trigger this behavior, set value to `always``. To disable, set value to `off`. Default is `fallback`.
      - `pre_segmented_query` boolean — You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same
      - `preset` string — Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.
      - `enable_curations` boolean — If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false
      - `prioritize_exact_match` boolean — Set this parameter to true to ensure that an exact match is ranked above the others
      - `max_candidates` integer — Control the number of words that Typesense considers for typo and prefix searching.
      - `prioritize_token_position` boolean — Make Typesense prioritize documents where the query words appear earlier in the text.
      - `prioritize_num_matching_fields` boolean — Make Typesense prioritize documents where the query words appear in more number of fields.
      - `enable_typos_for_numerical_tokens` boolean — Make Typesense disable typos for numerical tokens.
      - `exhaustive_search` boolean — Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored).
      - `search_cutoff_ms` integer — Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter.
      - `use_cache` boolean — Enable server side caching of search query results. By default, caching is disabled.
      - `cache_ttl` integer — The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60.
      - `min_len_1typo` integer — Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.
      - `min_len_2typo` integer — Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.
      - `vector_query` string — Vector query expression for fetching documents "closest" to a given query/document vector.
      - `remote_embedding_timeout_ms` integer — Timeout (in milliseconds) for fetching remote embeddings.
      - `remote_embedding_num_tries` integer — Number of times to retry fetching remote embeddings.
      - `facet_strategy` string — Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default).
      - `stopwords` string — Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query.
      - `facet_return_parent` string — Comma separated string of nested facet fields whose parent object should be returned in facet response.
      - `voice_query` string — The base64 encoded audio file in 16 khz 16-bit WAV format.
      - `conversation` boolean — Enable conversational search.
      - `conversation_model_id` string — The Id of Conversation Model to be used.
      - `conversation_id` string — The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM.
    - MultiSearchSearchesParameter
      - `union` boolean — When true, merges the search results from each search query into a single ordered set of hits.
      - `searches` MultiSearchCollectionParameters[], required
        - `q` string — The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by.
        - `query_by` string — A list of `string` fields that should be queried against. Multiple fields are separated with a comma.
        - `query_by_weights` string — The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma.
        - `text_match_type` string — In a multi-field matching context, this parameter determines how the representative text match score of a record is calculated. Possible values are max_score (default) or max_weight.
        - `prefix` string — Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true.
        - `infix` string — If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results
        - `max_extra_prefix` integer — There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match.
        - `max_extra_suffix` integer — There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match.
        - `filter_by` string — Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&.
        - `sort_by` string — A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc`
        - `facet_by` string — A list of fields that will be used for faceting your results on. Separate multiple fields with a comma.
        - `max_facet_values` integer — Maximum number of facet values to be returned.
        - `facet_query` string — Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe".
        - `num_typos` string — The number of typographical errors (1 or 2) that would be tolerated. Default: 2
        - `page` integer — Results from this specific page number would be fetched.
        - `per_page` integer — Number of results to fetch per page. Default: 10
        - `limit` integer — Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10.
        - `offset` integer — Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter.
        - `group_by` string — You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field.
        - `group_limit` integer — Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3
        - `group_missing_values` boolean — Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true
        - `include_fields` string — List of fields from the document to include in the search result
        - `exclude_fields` string — List of fields from the document to exclude in the search result
        - `highlight_full_fields` string — List of fields which should be highlighted fully without snippeting
        - `highlight_affix_num_tokens` integer — The number of tokens that should surround the highlighted text on each side. Default: 4
        - `highlight_start_tag` string — The start tag used for the highlighted snippets. Default: `<mark>`
        - `highlight_end_tag` string — The end tag used for the highlighted snippets. Default: `</mark>`
        - `snippet_threshold` integer — Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30
        - `drop_tokens_threshold` integer — If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10
        - `drop_tokens_mode` 'right_to_left' | 'left_to_right' | 'both_sides:3' — Dictates the direction in which the words in the query must be dropped when the original words in the query do not appear in any document. Values: right_to_left (default), left_to_right, both_sides:3 A note on both_sides:3 - for queries up to 3 tokens (words) in length, this mode will drop tokens from both sides and exhaustively rank all matching results. If query length is greater than 3 words, Typesense will just fallback to default behavior of right_to_left
        - `typo_tokens_threshold` integer — If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100
        - `enable_typos_for_alpha_numerical_tokens` boolean — Set this parameter to false to disable typos on alphanumerical query tokens. Default: true.
        - `filter_curated_hits` boolean — Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
        - `enable_synonyms` boolean — If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true
        - `enable_analytics` boolean — Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script).
        - `synonym_prefix` boolean — Allow synonym resolution on word prefixes in the query. Default: false
        - `synonym_num_typos` integer — Allow synonym resolution on typo-corrected words in the query. Default: 0
        - `pinned_hits` string — A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
        - `hidden_hits` string — A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
        - `curation_tags` string — Comma separated list of tags to trigger the curations rules that match the tags.
        - `highlight_fields` string — A list of custom fields that must be highlighted even if you don't query for them
        - `pre_segmented_query` boolean — You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same
        - `preset` string — Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.
        - `enable_curations` boolean — If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false
        - `prioritize_exact_match` boolean — Set this parameter to true to ensure that an exact match is ranked above the others
        - `prioritize_token_position` boolean — Make Typesense prioritize documents where the query words appear earlier in the text.
        - `prioritize_num_matching_fields` boolean — Make Typesense prioritize documents where the query words appear in more number of fields.
        - `enable_typos_for_numerical_tokens` boolean — Make Typesense disable typos for numerical tokens.
        - `exhaustive_search` boolean — Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored).
        - `search_cutoff_ms` integer — Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter.
        - `use_cache` boolean — Enable server side caching of search query results. By default, caching is disabled.
        - `cache_ttl` integer — The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60.
        - `min_len_1typo` integer — Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.
        - `min_len_2typo` integer — Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.
        - `vector_query` string — Vector query expression for fetching documents "closest" to a given query/document vector.
        - `remote_embedding_timeout_ms` integer — Timeout (in milliseconds) for fetching remote embeddings.
        - `remote_embedding_num_tries` integer — Number of times to retry fetching remote embeddings.
        - `facet_strategy` string — Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default).
        - `stopwords` string — Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query.
        - `facet_return_parent` string — Comma separated string of nested facet fields whose parent object should be returned in facet response.
        - `voice_query` string — The base64 encoded audio file in 16 khz 16-bit WAV format.
        - `conversation` boolean — Enable conversational search.
        - `conversation_model_id` string — The Id of Conversation Model to be used.
        - `conversation_id` string — The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM.
        - `validate_field_names` boolean — Controls whether Typesense should validate if the fields exist in the schema. When set to false, Typesense will not throw an error if a field is missing. This is useful for programmatic grouping where not all fields may exist.
        - `collection` string — The collection to search in.
        - `x-typesense-api-key` string — A separate search API key for each search within a multi_search request
        - `rerank_hybrid_matches` boolean — When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score.
  - `name` string, required

## Other responses

- `404` — Preset not found.

---

[API](https://skmtc.dev/typesense/apis/typesense-api.md) · [All operations](https://skmtc.dev/typesense/apis/typesense-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/typesense/typesense-api/revisions/1d9b3b61638e/schema)
