IndexFieldKind (index/schema.py)

EverOS · src/everos/infra/persistence/index/schema.py · python · Apache-2.0
database, tag:embed-classified

Defines portable index field kinds and schema for derived-index adapters.

# Source: https://github.com/EverMind-AI/EverOS | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Logical schema descriptions shared by derived-index adapters.

The record models remain the source of truth for logical fields. This module
normalizes their supported types into a small backend-neutral vocabulary and
fails loudly when a new field has no portable representation. Physical limits
and index options remain adapter responsibilities.
"""

from __future__ import annotations

import datetime as dt
from dataclasses import dataclass
from enum import StrEnum
from functools import cache
from typing import Any, get_args, get_origin

_DEFAULT_STRING_LENGTH = 65_535
_ID_LENGTH = 512


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key