Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hexxladb.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

QueryCells

Execute a CellQuery against the snapshot. Planner picks cheapest index; remaining predicates applied in-memory.
results, err := tx.QueryCells(ctx, hexxladb.CellQuery{
    Query:          "integration test",
    RequireTags:    []string{"fact", "testing"},
    ExcludeTags:    []string{"preference"},
    SourceID:       "session-2",
    MinConfidence:  0.5,
    MaxConfidence:  1.0,
    After:          &startTime,
    Before:         &endTime,
    Center:         &centerCoord,
    Radius:         3,
    MaxResults:     10,
    SortBy:         hexxladb.SortByScore,
    Explain:        true,
})
All predicate fields are AND-combined; zero/empty values are ignored.

CellQuery fields

FieldDescription
QueryFull-text search query
RequireTagsTags that must all be present (AND)
AnyTagsTags where at least one must be present (OR)
ExcludeTagsTags that must not be present (NOT)
SourceIDFilter by source ID
MinConfidenceMinimum confidence threshold
MaxConfidenceMaximum confidence threshold
AfterFilter by ValidFrom (after this time)
BeforeFilter by ValidFrom (before this time)
CenterSpatial query center coordinate
RadiusSpatial query radius
EmbeddingVector for ANN-accelerated seed selection
MaxResultsMaximum results to return
MaxScanRowsMaximum rows to scan
SortBySort order
ExplainReturn explanation string

Sort order

Sort orderDescription
SortByScoreSort by composite score (default)
SortByConfidenceSort by confidence
SortByRecencySort by creation time
SortByCoordSort by coordinate

Query planner index selection

The planner picks the cheapest index based on the query:
ConditionPrimary index
RequireTags non-emptytag/ secondary index
SourceID setsource/ secondary index
After or Before settime/ week-bucket index
Center+Radius setRing walk around Center
Embedding setHNSW graph (ANN search)
FallbackFull scan (ring walk from origin, radius 32)

Temporal queries

After/Before filter on cell ValidFrom. Cells with no ValidFrom are excluded from any temporal query. Uses the existing time/ weekly-bucket index.
startTime := time.Date(2026, 4, 1, 0, 0, 0, 0, time.UTC)
endTime := time.Now()

results, err := tx.QueryCells(ctx, hexxladb.CellQuery{
    After:  &startTime,
    Before: &endTime,
})

CellQueryResult

type CellQueryResult struct {
    Cell        CellView
    Score       float64
    Explanation string // when Explain=true
}

See also

  • Search — Content search wrapper
  • Cells — Cell operations