Manticore Search · Schema

knn

Object representing a k-nearest neighbor search query

SearchFull-Text SearchVector SearchElasticsearch CompatibleOpen-SourceDatabase

Properties

Name Type Description
field string Field to perform the k-nearest neighbor search on
k integer Deprecated. Use the top-level `limit` parameter instead.
query object
query_vector array The vector used as input for the KNN search
doc_id integer The docuemnt ID used as input for the KNN search
ef integer Optional parameter controlling the accuracy of the search
filter object
View JSON Schema on GitHub

JSON Schema

knn.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/manticore/main/json-schema/knn.json",
  "title": "knn",
  "description": "Object representing a k-nearest neighbor search query",
  "type": "object",
  "required": [
    "field"
  ],
  "properties": {
    "field": {
      "type": "string",
      "description": "Field to perform the k-nearest neighbor search on"
    },
    "k": {
      "type": "integer",
      "deprecated": true,
      "description": "Deprecated. Use the top-level `limit` parameter instead."
    },
    "query": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      ]
    },
    "query_vector": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "The vector used as input for the KNN search"
    },
    "doc_id": {
      "type": "integer",
      "format": "uint64",
      "description": "The docuemnt ID used as input for the KNN search"
    },
    "ef": {
      "type": "integer",
      "description": "Optional parameter controlling the accuracy of the search"
    },
    "filter": {
      "$ref": "#/components/schemas/queryFilter"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/knn"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.