ontocast.tool.vector_store.core¶
Core contracts and models for ontology vector storage.
GraphAtom
¶
Bases: BasePydanticModel
Embedding-ready ontology entity atom.
Source code in ontocast/tool/vector_store/core.py
representation
property
¶
Combined embedding text view for generic consumers.
OntologySearchHit
¶
Bases: BasePydanticModel
Typed retrieval result that separates atom payload from ranking metadata.
Source code in ontocast/tool/vector_store/core.py
OntologySearchHitsByChannel
¶
Bases: BasePydanticModel
Per-query retrieval hits split by vector channel (dense core/neighborhood + optional BM25).
Source code in ontocast/tool/vector_store/core.py
VectorStoreManager
¶
Bases: Tool
Abstract interface for vector store implementations.
Source code in ontocast/tool/vector_store/core.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
afetch_vectors(atom_ids)
async
¶
Async wrapper around :meth:fetch_vectors.
apply_tenancy(tenant, project, *, sep=TENANCY_SEP)
¶
Switch the active tenant/project partition when supported.
Source code in ontocast/tool/vector_store/core.py
asearch_patch_hits_many(queries, top_k=None, filter_iri=None, filter_version=None, filter_hash=None)
abstractmethod
async
¶
Async variant of :meth:search_patch_hits_many.
Source code in ontocast/tool/vector_store/core.py
clean_tenancy(tenant, project)
async
¶
Drop or empty vector collections derived from tenant / project.
Source code in ontocast/tool/vector_store/core.py
delete_ontology(iri, version=None, ontology_hash=None)
abstractmethod
¶
Delete all indexed atoms for a specific ontology IRI.
fetch_vectors(atom_ids)
abstractmethod
¶
index_ontology(ontology)
abstractmethod
¶
initialize()
abstractmethod
async
¶
reindex_ontology(ontology)
¶
Replace all atoms for a given ontology and return indexed count.
search_patch_hits(query, top_k=None, filter_iri=None, filter_version=None, filter_hash=None)
abstractmethod
¶
Search ontology atoms and return rank-fused scored hit objects.
Source code in ontocast/tool/vector_store/core.py
search_patch_hits_many(queries, top_k=None, filter_iri=None, filter_version=None, filter_hash=None)
abstractmethod
¶
Search ontology atoms for many queries with split-channel outputs.
Source code in ontocast/tool/vector_store/core.py
search_patches(query, top_k=None, filter_iri=None, filter_version=None, filter_hash=None)
abstractmethod
¶
Search ontology patches by query text (top_k None → store default).
Source code in ontocast/tool/vector_store/core.py
canonicalize_entity_role(role)
¶
Normalize role labels to vector-store vocabulary.