Skip to main content

Search collection

POST 

/api/v1/collections/:collection-id/search

Perform a search in a collection.

Request

Path Parameters

    collection-id stringrequired

    Collection ID

Body

    text stringrequired

    Search query text

    max_distance numbernullable

    Default value: 0.65

    Maximum similarity distance for the search results. Must be between 0 and 1.

    top_k numbernullable

    Default value: 5

    Maximum number of search results

Responses

Successful response

Schema

    result

    object[]

    required

    Search results consisting of chunks

  • Array [

  • id stringrequired

    Chunk ID

    content stringrequired

    Chunk content in plain text

    file_id stringrequired

    File ID which the chunk is part of

    distance numberrequired

    A value representing a similarity distance between query and result, smaller values means more similar.

    score numbernullable
  • ]

Loading...