---
title: "Fast index based search"
method: POST
path: "/collections/{collectionId}/points/search"
tags: ["Point"]
---

# Fast index based search

`POST /collections/{collectionId}/points/search`

This endpoint allows searching for points in a collection using the index. The search is based on the index schema of the collection.

## Request body

- SearchRequest
  - `query` Query, required — A query object that can be used to perform search. The query object can contain multiple filters, each with a property and a value. Use _and and _or to combine queries.
    - `property` string, required
    - `vectorFlat` SearchVectorFlatOptions — Options for searching vectors with flat indexing.
      - `vector` number[], required — A vector with a fixed number of dimensions
      - `operator` 'near', required
      - `limit` number, required — Maximum number of points to search
      - `filter` Query — recursive
      - `weight` number — The weight of the vector search, the higher the value, the more important the vector search is.
    - `vectorVamana` SearchVectorVamanaOptions — Options for searching vectors with Vamana indexing. The larger the search size the longer the search will take.
      - `vector` number[], required — A vector with a fixed number of dimensions
      - `operator` 'near', required
      - `searchSize` number, required — Determines the scope of the greedy search algorithm. The higher the value, the more exhaustive the search.
      - `limit` number, required — Maximum number of points to search
      - `filter` Query — recursive
      - `weight` number — The weight of the vector search, the higher the value, the more important the vector search is.
    - `text` SearchTextOptions — Text search options, the value is the text to search for. The weight determines the hybrid search weighting.
      - `value` string, required
      - `operator` 'containsAll' | 'containsAny', required
      - `limit` number, required — Maximum number of points to search
      - `filter` Query — recursive
      - `weight` number — The weight of the text search, the higher the value, the more important the text search is.
    - `string` SearchStringOptions — Options for searching strings. The operator determines how the search is performed. The value is a string to search for.
      - `value` string, required
      - `operator` 'startsWith' | 'equals' | 'notEquals' | 'greaterThan' | 'greaterThanOrEquals' | 'lessThan' | 'lessThanOrEquals' | 'inRange', required
      - `endValue` string
    - `integer` SearchNumberOptions — Options for searching numbers. The operator determines how the search is performed. The value is a number to search for, endValue is used for range queries.
      - `value` number, required
      - `operator` 'equals' | 'notEquals' | 'greaterThan' | 'greaterThanOrEquals' | 'lessThan' | 'lessThanOrEquals' | 'inRange', required
      - `endValue` number
    - `float` SearchNumberOptions — Options for searching numbers. The operator determines how the search is performed. The value is a number to search for, endValue is used for range queries.
      - `value` number, required
      - `operator` 'equals' | 'notEquals' | 'greaterThan' | 'greaterThanOrEquals' | 'lessThan' | 'lessThanOrEquals' | 'inRange', required
      - `endValue` number
    - `stringArray` SearchStringArrayOptions — Options for searching string arrays. The operator determines how the search is performed. The value is an array of strings to search for.
      - `value` string[], required
      - `operator` 'containsAll' | 'containsAny', required
    - `_and` Query[]
    - `_or` Query[]
  - `select` string[] — A list of properties to return in the search results. If not provided, all properties are returned.
  - `sort` SortOption[] — A list of sort options for the search results. The search results are sorted by the first sort option, then the second, and so on.
    - `property` string, required
    - `descending` boolean, required
  - `offset` number — The number of points to skip in the search results
  - `limit` number, required — Maximum number of points to return

## Response `200`

Search results ordered by relevance

- SearchPointsResponse
  - `points` PointAsObject[]
    - `_id` string, uuid

## Changes

- **2024-04-11** (v2) `0ab02181dc18` — 1 warning, 1 info
  - removed the request property `sort/items/order`
  - added the new required request property `sort/items/descending` with a default value
- **2024-04-11** (v2) `e6fd80307fb5` — 1 breaking, 4 warning, 6 info
  - added the new required request property `query`
  - removed the request property `vector`
  - removed the optional property `points/items/distance` from the response with the `200` status
  - removed the optional property `points/items/id` from the response with the `200` status
  - …7 more
- **2024-03-05** (v2) `dd1cf2f988c1` — 2 breaking, 5 warning, 4 info
  - added the new required request property `vector`
  - the `limit` request property's max was decreased to `75.00`
  - removed the request property `offset`
  - removed the request property `query`
  - …7 more

[Change history](https://skmtc.dev/semafind/apis/semadb-api/changes/collections/:collectionId/points/search/post.md)

---

[API](https://skmtc.dev/semafind/apis/semadb-api.md) · [All operations](https://skmtc.dev/semafind/apis/semadb-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/semafind/semadb-api/revisions/e756ed7c3cd3/schema)
