Skip to main content

Typesense_SearchParams_Input

JSON Schema for Typesense SearchParams

input Typesense_SearchParams_Input {
collection: String
rerank_hybrid_matches: Boolean
x_typesense_api_key: String
q: String
query_by: String
query_by_weights: String
prefix: String
filter_by: String
max_filter_by_candidates: Int
enable_synonyms: Boolean
enable_analytics: Boolean
filter_curated_hits: Boolean
enable_lazy_filter: Boolean
sort_by: String
facet_by: String
max_facet_values: Int
facet_sample_threshold: Int
facet_sample_percent: Float
facet_query: String
facet_query_num_typos: Int
facet_return_parent: String
facet_strategy: Typesense_MultiSearchRequestParamsFacetStrategy
page: Int
per_page: Int
group_by: String
group_limit: Int
group_missing_values: Boolean
include_fields: String
exclude_fields: String
highlight_fields: String
highlight_full_fields: String
highlight_affix_num_tokens: Int
highlight_start_tag: String
highlight_end_tag: String
enable_highlight_v1: Boolean
snippet_threshold: Float
num_typos: String
min_len_1typo: Int
min_len_2typo: Int
split_join_tokens: Typesense_OperationMode
exhaustive_search: Boolean
drop_tokens_threshold: Float
drop_tokens_mode: Typesense_MultiSearchRequestParamsDropTokensMode
typo_tokens_threshold: Float
pinned_hits: String
hidden_hits: String
limit_hits: Int
pre_segmented_query: Boolean
enable_overrides: Boolean
override_tags: String
prioritize_exact_match: Boolean
prioritize_token_position: Boolean
prioritize_num_matching_fields: Boolean
search_cutoff_ms: Int
use_cache: Boolean
max_candidates: Int
infix: Typesense_OperationMode
preset: String
text_match_type: Typesense_MultiSearchRequestParamsTextMatchType
vector_query: String
x_typesense_user_id: String
offset: Int
limit: Int
stopwords: String
conversation: Boolean
conversation_model_id: String
conversation_id: String
voice_query: String
max_extra_prefix: Int
max_extra_suffix: Int
remote_embedding_timeout_ms: Int
remote_embedding_num_tries: Int
enable_typos_for_numerical_tokens: Boolean
cache_ttl: Int
synonym_num_typos: Int
enable_typos_for_alpha_numerical_tokens: Boolean
synonym_prefix: Boolean
}

Fields

Typesense_SearchParams_Input.collection ● String scalar

The collection to search in.

Typesense_SearchParams_Input.rerank_hybrid_matches ● Boolean scalar

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.

Typesense_SearchParams_Input.x_typesense_api_key ● String scalar

A separate search API key for each search within a multi_search request

Typesense_SearchParams_Input.q ● String scalar

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.

Typesense_SearchParams_Input.query_by ● String scalar

A list of string fields that should be queried against. Multiple fields are separated with a comma.

Typesense_SearchParams_Input.query_by_weights ● String scalar

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.

Typesense_SearchParams_Input.prefix ● String scalar

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.

Typesense_SearchParams_Input.filter_by ● String scalar

Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&.

Typesense_SearchParams_Input.max_filter_by_candidates ● Int scalar

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*.

Typesense_SearchParams_Input.enable_synonyms ● Boolean scalar

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

Typesense_SearchParams_Input.enable_analytics ● Boolean scalar

Typesense_SearchParams_Input.filter_curated_hits ● Boolean scalar

Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false

Typesense_SearchParams_Input.enable_lazy_filter ● Boolean scalar

Typesense_SearchParams_Input.sort_by ● String scalar

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

Typesense_SearchParams_Input.facet_by ● String scalar

A list of fields that will be used for faceting your results on. Separate multiple fields with a comma.

Typesense_SearchParams_Input.max_facet_values ● Int scalar

Maximum number of facet values to be returned.

Typesense_SearchParams_Input.facet_sample_threshold ● Int scalar

Typesense_SearchParams_Input.facet_sample_percent ● Float scalar

Typesense_SearchParams_Input.facet_query ● String scalar

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".

Typesense_SearchParams_Input.facet_query_num_typos ● Int scalar

Typesense_SearchParams_Input.facet_return_parent ● String scalar

Comma separated string of nested facet fields whose parent object should be returned in facet response.

Typesense_SearchParams_Input.facet_strategy ● Typesense_MultiSearchRequestParamsFacetStrategy enum

Typesense_SearchParams_Input.page ● Int scalar

Results from this specific page number would be fetched.

Typesense_SearchParams_Input.per_page ● Int scalar

Number of results to fetch per page. Default: 10

Typesense_SearchParams_Input.group_by ● String scalar

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.

Typesense_SearchParams_Input.group_limit ● Int scalar

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

Typesense_SearchParams_Input.group_missing_values ● Boolean scalar

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

Typesense_SearchParams_Input.include_fields ● String scalar

List of fields from the document to include in the search result

Typesense_SearchParams_Input.exclude_fields ● String scalar

List of fields from the document to exclude in the search result

Typesense_SearchParams_Input.highlight_fields ● String scalar

A list of custom fields that must be highlighted even if you don't query for them

Typesense_SearchParams_Input.highlight_full_fields ● String scalar

List of fields which should be highlighted fully without snippeting

Typesense_SearchParams_Input.highlight_affix_num_tokens ● Int scalar

The number of tokens that should surround the highlighted text on each side. Default: 4

Typesense_SearchParams_Input.highlight_start_tag ● String scalar

The start tag used for the highlighted snippets. Default: <mark>

Typesense_SearchParams_Input.highlight_end_tag ● String scalar

The end tag used for the highlighted snippets. Default: </mark>

Typesense_SearchParams_Input.enable_highlight_v1 ● Boolean scalar

Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true

Typesense_SearchParams_Input.snippet_threshold ● Float scalar

Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30

Typesense_SearchParams_Input.num_typos ● String scalar

The number of typographical errors (1 or 2) that would be tolerated. Default: 2

Typesense_SearchParams_Input.min_len_1typo ● Int scalar

Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.

Typesense_SearchParams_Input.min_len_2typo ● Int scalar

Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.

Typesense_SearchParams_Input.split_join_tokens ● Typesense_OperationMode enum

Typesense_SearchParams_Input.exhaustive_search ● Boolean scalar

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).

Typesense_SearchParams_Input.drop_tokens_threshold ● Float scalar

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.

Typesense_SearchParams_Input.drop_tokens_mode ● Typesense_MultiSearchRequestParamsDropTokensMode enum

Typesense_SearchParams_Input.typo_tokens_threshold ● Float scalar

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

Typesense_SearchParams_Input.pinned_hits ● String scalar

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 Overrides feature to override search results based on rules. Overrides are applied first, followed by pinned_hits and finally hidden_hits.

Typesense_SearchParams_Input.hidden_hits ● String scalar

A list of records to unconditionally hide from search results. A list of record_ids to hide. Eg: to hide records with IDs 123 and 456, you'd specify 123,456. You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by pinned_hits and finally hidden_hits.

Typesense_SearchParams_Input.limit_hits ● Int scalar

Typesense_SearchParams_Input.pre_segmented_query ● Boolean scalar

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

Typesense_SearchParams_Input.enable_overrides ● Boolean scalar

If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false

Typesense_SearchParams_Input.override_tags ● String scalar

Comma separated list of tags to trigger the curations rules that match the tags.

Typesense_SearchParams_Input.prioritize_exact_match ● Boolean scalar

Set this parameter to true to ensure that an exact match is ranked above the others

Typesense_SearchParams_Input.prioritize_token_position ● Boolean scalar

Make Typesense prioritize documents where the query words appear earlier in the text.

Typesense_SearchParams_Input.prioritize_num_matching_fields ● Boolean scalar

Make Typesense prioritize documents where the query words appear in more number of fields.

Typesense_SearchParams_Input.search_cutoff_ms ● Int scalar

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.

Typesense_SearchParams_Input.use_cache ● Boolean scalar

Enable server side caching of search query results. By default, caching is disabled.

Typesense_SearchParams_Input.max_candidates ● Int scalar

Control the number of words that Typesense considers for typo and prefix searching.

Typesense_SearchParams_Input.infix ● Typesense_OperationMode enum

Typesense_SearchParams_Input.preset ● String scalar

Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.

Typesense_SearchParams_Input.text_match_type ● Typesense_MultiSearchRequestParamsTextMatchType enum

Typesense_SearchParams_Input.vector_query ● String scalar

Vector query expression for fetching documents "closest" to a given query/document vector.

Typesense_SearchParams_Input.x_typesense_user_id ● String scalar

Typesense_SearchParams_Input.offset ● Int scalar

Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter.

Typesense_SearchParams_Input.limit ● Int scalar

Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10.

Typesense_SearchParams_Input.stopwords ● String scalar

Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query.

Typesense_SearchParams_Input.conversation ● Boolean scalar

Enable conversational search.

Typesense_SearchParams_Input.conversation_model_id ● String scalar

The Id of Conversation Model to be used.

Typesense_SearchParams_Input.conversation_id ● String scalar

The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM.

Typesense_SearchParams_Input.voice_query ● String scalar

The base64 encoded audio file in 16 khz 16-bit WAV format.

Typesense_SearchParams_Input.max_extra_prefix ● Int scalar

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.

Typesense_SearchParams_Input.max_extra_suffix ● Int scalar

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.

Typesense_SearchParams_Input.remote_embedding_timeout_ms ● Int scalar

Timeout (in milliseconds) for fetching remote embeddings.

Typesense_SearchParams_Input.remote_embedding_num_tries ● Int scalar

Number of times to retry fetching remote embeddings.

Typesense_SearchParams_Input.enable_typos_for_numerical_tokens ● Boolean scalar

Make Typesense disable typos for numerical tokens.

Typesense_SearchParams_Input.cache_ttl ● Int scalar

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.

Typesense_SearchParams_Input.synonym_num_typos ● Int scalar

Allow synonym resolution on typo-corrected words in the query. Default: 0

Typesense_SearchParams_Input.enable_typos_for_alpha_numerical_tokens ● Boolean scalar

Set this parameter to false to disable typos on alphanumerical query tokens. Default: true.

Typesense_SearchParams_Input.synonym_prefix ● Boolean scalar

Allow synonym resolution on word prefixes in the query. Default: false

Member Of

Typesense_MultiSearchRequest_Input input