Skip to content

feat(openapi): add documented v30.2 search and multi_search params - #121

Open
haydenhoang wants to merge 2 commits into
typesense:masterfrom
haydenhoang:openapi-v30.2-search
Open

haydenhoang wants to merge 2 commits into
typesense:masterfrom
haydenhoang:openapi-v30.2-search

Conversation

@haydenhoang

Copy link
Copy Markdown
Collaborator

Change Summary

Adds the missing search params Typesense v30.2:

SearchParameters (GET /collections/{collectionName}/documents/search):

  • analytics_tag
  • diversity_lambda
  • nl_query_prompt_cache_ttl

MultiSearchParameters (POST /multi_search, used by both the query string and each entry of searches[]):

  • analytics_tag, diversity_lambda, enable_highlight_v1, max_candidates, split_join_tokens, synonym_sets
  • nl_query, nl_model_id, nl_query_prompt_cache_ttl
  • collection, limit_multi_searches, conversation_stream

MultiSearchSearchesParameter (the body):

  • remove_duplicates, next to union

Also

  • Fixes a stray backtick in the split_join_tokens description.
  • MultiSearchCollectionParameters no longer declares collection itself. It still has it, through allOf from MultiSearchParameters.

Left out

The server also reads the following, but the v30.2 docs don't mention them. They're left out until they're documented:

  • rank_tokens_by
  • diversity_limit
  • the personalization_* search params
  • conversation_stream on the single-search endpoint

PR Checklist

Add the documented search params the server reads to
MultiSearchParameters, which both the query string and each entry of
searches[] use: analytics_tag, diversity_lambda, enable_highlight_v1,
max_candidates, the nl_* params, split_join_tokens and synonym_sets.

The server copies the query string into every search before applying
that search's own params, so the params it reads only from the query
string (collection, limit_multi_searches, conversation_stream) go in
MultiSearchParameters too, next to the conversation params already
there. Clients that unwrap MultiSearchParameters into query params or
pass it as the query object pick them up without changes.
MultiSearchCollectionParameters no longer repeats collection, which it
now gets from MultiSearchParameters. remove_duplicates sits next to
union in the body.

Also drop a stray backtick in the split_join_tokens description, in
SearchParameters and in the copy added here.
Add the documented params GET /collections/{collectionName}/documents/search
reads that SearchParameters lacked: analytics_tag, diversity_lambda and
nl_query_prompt_cache_ttl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant