Core concepts · Search

Indexes are projections; schema preserves meaning

Choose lexical, vector, filter, relational, and graph capabilities deliberately—without confusing the search backend with the corpus data model.

What an index is

An index is a rebuildable searchable projection of canonical records and fragments. It is not source truth. If a projection is deleted, CoreCortex can recreate it from the versioned corpus, pipeline, and canonical records.

One index may contain lexical text, vectors, and exact filter fields. ‘Hybrid’ describes how a retrieval plan uses those capabilities; it does not create a second canonical record format.

Field roleMeaningTypical use
LexicalTokenized title or contentExact terms, citations, identifiers, BM25
VectorDense embedding with fixed dimensionsParaphrases and semantic similarity
FilterExact scalar metadata and access fieldsScope, dates, categories, tenants, ACLs

The available retrieval types

TypeWhat it doesUse it when
Lexical / BM25Ranks token and term matchesNames, codes, citations, or exact language matter
Dense vectorRanks embedding similarityQuestions paraphrase the source
HybridFuses lexical and vector candidatesThe workload mixes exact and semantic queries
FilteredApplies exact metadata and authorizationResults must obey scope, dates, policy, or tenant rules
RelationalUses typed columns, joins, and aggregationThe question is structured or analytical
Graph-assistedExpands evidenced relationships or bounded pathsReviewed multi-hop judgments show a benefit

Index type is not backend

TurboPuffer, PostgreSQL, Milvus, pgvector, and Ladybug are execution backends. The portable contract declares required capabilities; the adapter advertises what it can execute; the planner chooses placement.

HNSW, IVFFlat, vector distance, analyzers, and collection tuning are physical adapter settings—not portable logical index types.

BackendRole in CoreCortex
TurboPufferNative lexical, vector, filters, and RRF
PostgreSQLFull-text, exact filters, relational queries, optional pgvector
Milvus / pgvectorVector adapters behind the extension contract
LadybugEmbedded graph projection for neighborhoods and bounded paths

What schema means

Schema is the agreement about fields, types, identity, and constraints. CoreCortex uses four related schemas and keeps their responsibilities separate.

SchemaPurpose
Configuration schemaLegal corec.yaml structure; generated by corec schema
Source schemaObserved input fields, types, nulls, cardinality, and lengths
Canonical record schemaStable identity, title, content, typed attributes, access, and provenance
Physical index schemaDerived backend columns, vector dimensions, analyzers, and indexes

A concrete searchable projection

The projection supports three field roles. The plan chooses two candidate generators, fuses their ranks, and returns ten authorized evidence items. Sparse-only and dense-only plans can reuse the same projection during evaluation.

yamlCoreCortex Core
indexes:
  - name: support
    backend:
      type: turbopuffer
      connectionSecret: secret://corec/turbopuffer
    fields:
      lexical: [title, content]
      vector:
        - name: content_embedding
          dimensions: 384
      filter: [tenant_id, dataset_id, category, plan]

retrievalPlans:
  - name: support-hybrid
    index: support
    candidates:
      - { type: bm25, field: content, limit: 50 }
      - { type: vector, field: content_embedding, limit: 50 }
    fusion: { type: rrf, rankConstant: 60 }
    limit: 10