KvIndexStore is the IndexStore written over the p/KvBackend substrate. This
namespace holds every index family's key shapes (index-families is the registry), the
one batch that posts a sentex to all of them, and the reads. The ops of a batch fold
through apply-op. See docs/indexing.md.
`KvIndexStore` is the `IndexStore` written over the `p/KvBackend` substrate. This namespace holds every index family's key shapes (`index-families` is the registry), the one batch that posts a sentex to all of them, and the reads. The ops of a batch fold through `apply-op`. See docs/indexing.md.
(apply-op m [op k a])Apply one kv-batch write op to map m, returning [m' reply]. Only
:increment/:decrement reply meaningfully (the post-op counter value); the rest reply nil.
:remove-from-set drops the key when the set empties, so an absent key and an empty set are
indistinguishable. :decrement floors at zero, per the KvBackend contract. An
unrecognized op goes to unknown-op!.
Apply one `kv-batch` write op to map `m`, returning `[m' reply]`. Only `:increment`/`:decrement` reply meaningfully (the post-op counter value); the rest reply nil. `:remove-from-set` drops the key when the set empties, so an absent key and an empty set are indistinguishable. `:decrement` floors at zero, per the `KvBackend` contract. An unrecognized op goes to `unknown-op!`.
(arg-slots sentex)[[pred pos term] ...] - the argument-root nodes a fact enters, each term canonical.
Empty for a rule and for a non-fact, matching root-keys.
`[[pred pos term] ...]` - the argument-root nodes a fact enters, each term canonical. Empty for a rule and for a non-fact, matching `root-keys`.
(batch! backend ops)kv-batch of ops on backend, after recording in the open write record what each
op's key held before it (keep-op!). Every index write a KvIndexStore or a
ColumnarIndexStore's families make runs through here.
`kv-batch` of `ops` on `backend`, after recording in the open write record what each op's key held before it (`keep-op!`). Every index write a `KvIndexStore` or a `ColumnarIndexStore`'s families make runs through here.
The informant of the justification of (unary_predicate T) by an argument declaration
naming T (special/unary-entailments). No mint informant: the membership enters no
mint family.
The informant of the justification of `(unary_predicate T)` by an argument declaration naming `T` (`special/unary-entailments`). No mint informant: the membership enters no mint family.
(family-ctxs op ctxs)ctxs as a family read takes it: nil for p/every-context, the set otherwise. Throws
on nil, which a reader passes by forgetting its ancestor set. Both implementers call it.
`ctxs` as a family read takes it: nil for `p/every-context`, the set otherwise. Throws on nil, which a reader passes by forgetting its ancestor set. Both implementers call it.
(flat-family-adds ops backend trie sentex handle){:ops ops :counts {:terms n :roots n :term-names n :slots n}} — conjes onto the transient
ops the non-trie write ops entering sentex under handle, and reports the number
of ops each family took. :ops is the transient conj! returned: the caller keeps
using it, and seals it with persistent!.
The order is terms, roots, nodes, opposed, named, mint rules, term names, slots;
:roots counts the ops from the roots through the mint rules, and assert_cost_test asserts the
per-family counts on either store. Every read runs here, before the caller batches.
`{:ops ops :counts {:terms n :roots n :term-names n :slots n}}` — conjes onto the transient
`ops` the non-trie write ops entering `sentex` under `handle`, and reports the number
of ops each family took. `:ops` is the transient `conj!` returned: the caller keeps
using it, and seals it with `persistent!`.
The order is terms, roots, nodes, opposed, named, mint rules, term names, slots;
`:roots` counts the ops from the roots through the mint rules, and `assert_cost_test` asserts the
per-family counts on either store. Every read runs here, before the caller batches.(flat-family-retires backend trie sentex handle){:ops [...] :counts {:terms n :roots n :term-names n :slots n}} — the mirror of
flat-family-adds: the ops taking handle out of those same families, and the
number of ops each family takes.
Every read runs here, before the caller batches the ops, so a name leaves the term-name set, a predicate leaves its argument slot and a node leaves the argument trie exactly on the last sentex to carry it.
`{:ops [...] :counts {:terms n :roots n :term-names n :slots n}}` — the mirror of
`flat-family-adds`: the ops taking `handle` out of those same families, and the
number of ops each family takes.
Every read runs here, before the caller batches the ops, so a name leaves the term-name
set, a predicate leaves its argument slot and a node leaves the argument trie
exactly on the last sentex to carry it.(handle-key? k)Does k name a handle set (int postings), by index-families' :leaf: one of a set
family's keys, or a trie or count trie's [tag :handles …] key? A child set, a counter
and a name set do not. dense-kv stores the sets it names as postings, and a
fork's index half names the base handles posted at them (vaelii.impl.overlay.kv).
Does `k` name a handle set (int postings), by `index-families`' `:leaf`: one of a set family's keys, or a trie or count trie's `[tag :handles …]` key? A child set, a counter and a name set do not. `dense-kv` stores the sets it names as postings, and a fork's index half names the base handles posted at them (`vaelii.impl.overlay.kv`).
The registry holds one row per index family, keyed by its tag (the first element of every key the index writes). docs/indexing.md, "The index-family registry", states each field's values and what it decides.
The registry holds one row per index family, keyed by its tag (the first element of every key the index writes). docs/indexing.md, "The index-family registry", states each field's values and what it decides.
This number names the key shapes this build's index is written in (docs/indexing.md §7). Bump it whenever a key shape changes (a new family, a renamed tag, a different arity, a different value type at an existing key), when the set of sentences a family files changes, or when the test that files a body under one of two families changes.
This number names the key shapes this build's index is written in (docs/indexing.md §7). Bump it whenever a key shape changes (a new family, a renamed tag, a different arity, a different value type at an existing key), when the set of sentences a family files changes, or when the test that files a body under one of two families changes.
(justification-family-entry? entry)Is entry, a [key value] index entry, one of a family the stored justifications
derive rather than the stored sentexes (:source :justification in index-families)?
Is `entry`, a `[key value]` index entry, one of a family the stored justifications derive rather than the stored sentexes (`:source :justification` in `index-families`)?
(key-relation k)The taxonomy relation key k ([:genl a b], [:genlCx a b], a flat-cache key)
belongs to: :genl, :genlCx, or :flat for every flat-cache key.
The taxonomy relation key `k` (`[:genl a b]`, `[:genlCx a b]`, a flat-cache key) belongs to: `:genl`, `:genlCx`, or `:flat` for every flat-cache key.
(mint-justification? records j)Is the justification j one an argument declaration's entailment adds: a mint, whose
informant is a stored rule of mint-rules (mint-rule-kind), or a declaredType
membership? One fetch from records for an integer informant.
Is the justification `j` one an argument declaration's entailment adds: a mint, whose informant is a stored rule of `mint-rules` (`mint-rule-kind`), or a `declaredType` membership? One fetch from `records` for an integer informant.
The context the inert rules of mint-rules are stored in.
The context the inert rules of `mint-rules` are stored in.
(mint-rule-kind s)The kind whose rule of mint-rules the stored sentex s is, or nil, read off s
alone. A sentex that is not an inert rule costs two field reads.
The kind whose rule of `mint-rules` the stored sentex `s` is, or nil, read off `s` alone. A sentex that is not an inert rule costs two field reads.
Maps each declaring kind (special/entailing-declarations, and resultArg) to the
set/inertRule that core.txt states and every mint of that kind is justified under
(special/entail-arg-type). Neither engine runs them (docs/argtypes.md).
Maps each declaring kind (`special/entailing-declarations`, and `resultArg`) to the `set/inertRule` that `core.txt` states and every mint of that kind is justified under (`special/entail-arg-type`). Neither engine runs them (docs/argtypes.md).
(prior-index store)The KvIndexStore store as it stood before the writes the open write record
recorded on its backend (prior-kv), or store itself when the record holds none.
The `KvIndexStore` `store` as it stood before the writes the open write record recorded on its backend (`prior-kv`), or `store` itself when the record holds none.
(prior-kv backend)backend as it stood before the writes the open write record recorded on it, or
backend itself when the record holds none.
`backend` as it stood before the writes the open write record recorded on it, or `backend` itself when the record holds none.
(root-keys sentex)The handle postings a sentex enters outside the trie and the term index: its context
root always, plus the leaf under each of its fact-nodes in its context.
The handle postings a sentex enters outside the trie and the term index: its context root always, plus the leaf under each of its `fact-nodes` in its context.
The batch-seal counter lives at this count prefix. Its increment is the last op of every
index-sentex batch and its decrement the last op of an unindex's cleanup batch
(docs/storage.md, the coverage check). The prefix is a namespaced keyword, so it collides
with no term path, and only its count key is written, so no trie walk meets it.
The batch-seal counter lives at this count prefix. Its increment is the last op of every `index-sentex` batch and its decrement the last op of an unindex's cleanup batch (docs/storage.md, the coverage check). The prefix is a namespaced keyword, so it collides with no term path, and only its count key is written, so no trie walk meets it.
(sentex-terms sentex)Returns the distinct terms the term index posts a sentex under: sx/index-terms plus
its context.
Returns the distinct terms the term index posts a sentex under: `sx/index-terms` plus its context.
(slot-adds ops backend sentex fnodes)Conj onto the transient ops the write ops entering a sentex's predicates in their slots,
one per [:argument-root [pred pos term]] of fnodes (fact-nodes) whose node holds no
context yet. Read before the postings are written, so a predicate is entered by the fact
that creates its node. Returns ops. Every unary fact writes its unary predicate set
entry with no read, and the [:unary-multi] and [:unary-kept …] entries read that set
twice (docs/indexing.md, "The unary predicate set").
Conj onto the transient `ops` the write ops entering a sentex's predicates in their slots, one per `[:argument-root [pred pos term]]` of `fnodes` (`fact-nodes`) whose node holds no context yet. Read before the postings are written, so a predicate is entered by the fact that creates its node. Returns `ops`. Every unary fact writes its unary predicate set entry with no read, and the `[:unary-multi]` and `[:unary-kept …]` entries read that set twice (docs/indexing.md, "The unary predicate set").
(term-names-retires backend terms handle)The write ops retiring the names in terms that handle is the last mention of —
read BEFORE their postings are removed, so a name dies exactly when its posting is
#{handle}.
The write ops retiring the names in `terms` that `handle` is the last mention of —
read BEFORE their postings are removed, so a name dies exactly when its posting is
`#{handle}`.(trie-reads count-at children leaf)The two trie reads the opposed family's writes take, over count-at (prefix ->
count) and children and leaf (prefix -> set): :count, and :leaves, the
[child handles] of each child of a prefix whose leaf one level below holds a handle.
The two trie reads the opposed family's writes take, over `count-at` (prefix -> count) and `children` and `leaf` (prefix -> set): `:count`, and `:leaves`, the `[child handles]` of each child of a prefix whose leaf one level below holds a handle.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |