Menu
Send multiple search requests in a single HTTP request
send multiple search requests in a single HTTP request
/multi_searchUse it in a workflow
- Add a step and choose the Typesense connector.
- Pick the Send multiple search requests in a single HTTP request action (under documents).
- Fill in the fields below, then reference the result from later steps as
{{sendMultipleSearchRequestsInASingleHttpRequest.response.data}}.
Request
Query parameters
multiSearchParametersobjectrequiredParameters for the multi search API.
qstringThe 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_bystringA list of `string` fields that should be queried against. Multiple fields are separated with a comma.
query_by_weightsstringThe 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_typestringIn 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.
prefixstringBoolean 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.
infixstringIf 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_prefixintegerThere 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_suffixintegerThere 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_bystringFilter conditions for refining youropen api validator search results. Separate multiple conditions with &&.
enable_lazy_filterbooleanApplies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false
max_filter_by_candidatesintegerControls 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_bystringA 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_bystringA list of fields that will be used for faceting your results on. Separate multiple fields with a comma.
max_facet_valuesintegerMaximum number of facet values to be returned.
facet_querystringFacet 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".
facet_query_num_typosintegerControls the fuzziness of the facet query filter. Default: 2.
num_typosstringThe number of typographical errors (1 or 2) that would be tolerated. Default: 2
pageintegerResults from this specific page number would be fetched.
per_pageintegerNumber of results to fetch per page. Default: 10
limitintegerNumber of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10.
offsetintegerIdentifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter.
group_bystringYou 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_limitintegerMaximum 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_valuesbooleanSetting 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
group_max_candidatesintegerOverrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value.
include_fieldsstringList of fields from the document to include in the search result
exclude_fieldsstringList of fields from the document to exclude in the search result
highlight_full_fieldsstringList of fields which should be highlighted fully without snippeting
highlight_affix_num_tokensintegerThe number of tokens that should surround the highlighted text on each side. Default: 4
highlight_start_tagstringThe start tag used for the highlighted snippets. Default: `<mark>`
highlight_end_tagstringThe end tag used for the highlighted snippets. Default: `</mark>`
snippet_thresholdintegerField values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30
drop_tokens_thresholdintegerIf 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_modestringDictates 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
One ofright_to_leftleft_to_rightboth_sides:3
typo_tokens_thresholdintegerIf 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_tokensbooleanSet this parameter to false to disable typos on alphanumerical query tokens. Default: true.
filter_curated_hitsbooleanWhether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
enable_synonymsbooleanIf 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_analyticsbooleanFlag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script).
Default true
synonym_prefixbooleanAllow synonym resolution on word prefixes in the query. Default: false
Request body
Enter the body as JSON in the step's Body field.
unionbooleanWhen true, merges the search results from each search query into a single ordered set of hits.
Default false
searchesarray<any>required{
"searches": [
null
],
"union": false
}
Response
Returns 200 with an object. Read it in later steps with {{sendMultipleSearchRequestsInASingleHttpRequest.response.data.<field>}}.
resultsarray<any>conversationobjectanswerstringrequiredconversation_historyarray<object>requiredconversation_idstringrequiredquerystringrequired{
"results": [
null
],
"conversation": {
"answer": "string",
"conversation_history": [
{}
],
"conversation_id": "string",
"query": "string"
}
}
Need more? See the Typesense guide for connection setup and behaviour shared by every action.