Post semantic search

POST /v1/search/

Body Required

  • query string Required

    The search query string

  • model_name string

    The semantic search model to use

    Default value is all-MiniLM-L6-v2.

  • keyspace string Required

    The keyspace to search within

    Default value is redwing_keyspace.

  • table string Required

    The table to search within

    Default value is vector.

  • metric string

    The metric to use for search (e.g., cosine similarity)

    Default value is cosine.

  • initial_top_k integer

    The initial number of top results to retrieve

    Default value is 1000000.

  • final_top_k integer

    The number of most relevant results to return after refining

    Default value is 5.

  • matches array[object]

    The list of matches after search

    Hide matches attributes Show matches attributes object
    • key string

      The key identifier for the matched vector

    • score number

      The score of the match

    • metadata object

      The associated metadata of the match

Responses

  • 200

    Search Performed

    Hide response attributes Show response attributes object
    • query string Required

      The search query string

    • model_name string

      The semantic search model to use

      Default value is all-MiniLM-L6-v2.

    • keyspace string Required

      The keyspace to search within

      Default value is redwing_keyspace.

    • table string Required

      The table to search within

      Default value is vector.

    • metric string

      The metric to use for search (e.g., cosine similarity)

      Default value is cosine.

    • initial_top_k integer

      The initial number of top results to retrieve

      Default value is 1000000.

    • final_top_k integer

      The number of most relevant results to return after refining

      Default value is 5.

    • matches array[object]

      The list of matches after search

      Hide matches attributes Show matches attributes object
      • key string

        The key identifier for the matched vector

      • score number

        The score of the match

      • metadata object

        The associated metadata of the match

POST /v1/search/
curl \
 -X POST https://api.infura.ai/v1/search/ \
 -H "x-api-key: $API_KEY" \
 -d '{"query":"string","model_name":"all-MiniLM-L6-v2","keyspace":"redwing_keyspace","table":"vector","metric":"cosine","initial_top_k":1000000,"final_top_k":5,"matches":[{"key":"string","score":42.0,"metadata":{}}]}'
Request example
{
  "query": "string",
  "model_name": "all-MiniLM-L6-v2",
  "keyspace": "redwing_keyspace",
  "table": "vector",
  "metric": "cosine",
  "initial_top_k": 1000000,
  "final_top_k": 5,
  "matches": [
    {
      "key": "string",
      "score": 42.0,
      "metadata": {}
    }
  ]
}
Response examples (200)
{
  "query": "string",
  "model_name": "all-MiniLM-L6-v2",
  "keyspace": "redwing_keyspace",
  "table": "vector",
  "metric": "cosine",
  "initial_top_k": 1000000,
  "final_top_k": 5,
  "matches": [
    {
      "key": "string",
      "score": 42.0,
      "metadata": {}
    }
  ]
}