Skip to content

feat(openapi): add documented v30.2 collection and document params - #122

Open
haydenhoang wants to merge 7 commits into
typesense:masterfrom
haydenhoang:openapi-v30.2-collections-documents
Open

haydenhoang wants to merge 7 commits into
typesense:masterfrom
haydenhoang:openapi-v30.2-collections-documents

Conversation

@haydenhoang

Copy link
Copy Markdown
Collaborator

Change Summary

Adds the missing collection and document params in Typesense v30.2:

Collections

  • POST /collections: the src_name and copy_documents query params, for cloning a collection.
  • CollectionUpdateSchema: curation_sets
  • Field:
    • cascade_delete (joins)
    • hnsw_params (ef_construction, M) (vector search)
    • truncate_len
    • In embed.model_config, the GCP options region, service_account, document_task and query_task.
  • DELETE /collections/{collectionName}: compact_store.

Documents

  • GET /collections/{collectionName}/documents/{documentId}: include_fields and exclude_fields.
  • DELETE /collections/{collectionName}/documents/{documentId}: ignore_not_found.
  • POST /collections/{collectionName}/documents and .../documents/import: remote_embedding_timeout_ms and remote_embedding_num_tries.

Left out

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

  • num_memory_shards
  • embed.mapping
  • embed.model_config.path
  • the personalization embedding options
  • return_doc, return_id, validate_field_names and top_k_by on delete by filter
  • batch_size and validate_field_names on export
  • dirty_values and validate_field_names on update by filter

PR Checklist

CollectionSchema gains curation_sets, and the endpoint gains the
src_name and copy_documents query params that clone a collection.

Field gains cascade_delete, hnsw_params, truncate_len, and the
model_config properties for GCP regions, service accounts and tasks.
Field is shared, so this also covers fields[] in
PATCH /collections/{collectionName}.

nested and nested_array are left out: the server computes them and
overwrites any value sent.
PATCH /collections/{collectionName} accepts curation_sets in v30.2, as
it does synonym_sets.
GET /collections/{collectionName}/documents/{documentId} prunes the
returned document with them in v30.2, as search does.
DELETE /collections/{collectionName}/documents/{documentId} reads it in
v30.2, and responds 200 with just the id when the document is missing.
POST /collections/{collectionName}/documents reads
remote_embedding_timeout_ms and remote_embedding_num_tries in v30.2, as
import does.
POST /collections/{collectionName}/documents/import reads
remote_embedding_timeout_ms and remote_embedding_num_tries in v30.2.
DELETE /collections/{collectionName} reads it in v30.2 and compacts the
deleted collection's key range in the store.
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