Skip to content

Retrieval APIs

Retrieval APIs allow querying the indexes, derived from the content added. Currently there are two types of indexes supported:

  • Vector Indexes for Semantic Search
  • Content Attribute Indexes

Vector Indexes

Vector Indexes are created by running embedding models on content. They allow doing semantic search on the indexes. The search results contain the chunks of text which matched the query and their corresponding scores.

The following example searches for the index embeddings for the query good and returns the top k results.

client.search_index("minilml6.embedding", "good", 3)
await client.searchIndex("minilml6.embedding", "good", 3);
curl -v -X POST http://localhost:8900/namespaces/default/search \
-H "Content-Type: application/json" \
-d '{
      "index": "minilml6.embedding",
      "query": "good", 
      "k": 1


            "text":"Indexify is amazing!",

Metadata Indexes

Metadata Indexes are created by extractors powered by AI Models which produced structured data. The output of such extractors are JSON documents and stored in a document store.

The schema of such indexes are defined by the extractors. The retrieval API for metadata indexes allows querying all the metadata in the index or the ones of a specific content id.

In the future we will add support for searching these indexes as well using sparse vectors, or add them to knowledge graphs.

The following example queries the index entities and returns the metadata for the content id foo.

client.query_metadata(index_name="entities", content_id="foo")
curl -v -X GET http://localhost:8900/namespaces/default/metadata\?index=entities&content_id=foo