Expand description
IssunDB is an embedded graph database in Rust.
Visit the project repository for documentation and examples
This is the main crate of IssunDB, and exposes the Graph type, Cypher query execution,
vector search, full-text search, and hybrid retrieval APIs. Application code, bindings,
and tools depend on this crate only; the internal crates (issundb-core, issundb-vector,
issundb-text, issundb-retrieval, and issundb-cypher) are not part of
the stable API.
§Entry Points
Graphis the central handle. Open it withGraph::open, then use its methods for node and edge CRUD, adjacency, and graph algorithms.GraphQueryExtadds Cypher execution (query,query_with_params, andexplain) toGraph.VectorGraphExtadds vector indexing and search toGraph.TextGraphExtandTextIndexExtadd full-text indexing and search.retrieve,retrieve_with, andretrieve_hybridrun hybrid retrieval over vector hits, text hits, and graph expansion.
§Working with Query Results
Query parameters and Record values use serde_json::Value. The
serde_json crate is re-exported as issundb::serde_json so
callers do not need to track a separate, version-compatible dependency.
Re-exports§
pub use serde_json;
Structs§
- Bm25
Scorer - BM25 (Okapi BM25) relevance scorer with default parameters k1 = 1.2, b = 0.75.
- Directed
Neighbor Entry - A neighbor entry with a direction flag, returned by
crate::Graph::all_neighbors. - Edge
Record - Stored in the
edgesLMDB sub-database as msgpack bytes. - Graph
- The graph database handle. It is cheap to clone, since all state is behind
Arc. - Grouped
Degree Spec - Describes the pattern
Graph::grouped_edge_countscounts, typed edges grouped by one endpoint. Withgroup_is_dst, edges are grouped by their destination and the source is the counted endpoint (in-degree per destination); otherwise edges are grouped by their source and the destination is counted (out-degree per source).group_labelandcounted_labeloptionally constrain each endpoint (Noneis unconstrained).counted_nonnull_propcounts an edge only when the counted endpoint’s property is non-null (the semantics ofcount(v.prop)over the expansion);Nonecounts every qualifying edge (the semantics ofcount(*)orcount(v), where a bound node variable is never null). - Hit
- A single result from vector search.
- Hybrid
Retrieve Options - Options for
retrieve_hybrid. - IdGroup
Codes - Dense group codes of one property, indexed by node id rather than by a
request’s position.
codes[node_id]is the node’s group code under exact value identity,ID_GROUP_ABSENTwhere no such node exists, andrepsholds one representative value per code. Built once per write generation bycrate::Graph::node_prop_group_codes_by_idand shared, so a grouped aggregation over a bulk row set reads one array cell per row instead of interning one value per row per query. - Neighbor
Count Spec - Describes the pattern
Graph::typed_neighbor_countscounts, the typed neighbors of each source across one hop.incomingfollows incoming edges instead of outgoing ones. A neighbor qualifies when it carries every label inneighbor_labels(an empty slice is unconstrained) and, whenneighbor_allowis present, is a member of that set; it adds to the counted total only whenneighbor_nonnull_propis absent or non-null on it (the semantics ofcount(v.prop)over the expansion, againstcount(*)). - Neighbor
Entry - The result of a single adjacency lookup entry returned by
crate::Graph::out_neighborsandcrate::Graph::in_neighbors. - Node
Record - Stored in the
nodesLMDB sub-database as msgpack bytes. - Path
Count Spec - Describes the pattern
Graph::count_linear_pathscounts, an open directed path of one or two hops,(v0)-[t1]->(v1)or(v0)-[t1]->(v1)-[t2]->(v2), with an optional relationship type per hop and an optional label per node variable.Nonemeans unconstrained. - Procedure
- A table-backed procedure.
rowseach containinputs.len() + outputs.len()cells: the first segment matches the declared inputs, the second the outputs. - Procedure
Registry - A runtime registry of procedures available to
CALL. - Query
Result - The tabular result of a Cypher query execution.
- ReadTxn
- A read-only transaction on the graph.
- Record
- An individual row in the query result table.
- Retrieve
Options - Options for
retrieve_with. - Subgraph
- A subgraph extracted by a retrieval call.
- TextHit
- A single ranked full-text search result.
- Text
Search Options - Options for full-text search.
- TfIdf
Scorer - TF-IDF relevance scorer. Lighter than BM25; no length normalization.
- Triangle
Count Spec - Describes the pattern
Graph::count_triangle_cyclescounts, the directed cycle(a)-[t1]->(b)-[t2]->(c)-[t3]->(a)with an optional relationship type per hop and an optional label per node variable.Nonemeans unconstrained. - Vector
Index Options - Construction options for
VectorIndex. - Vector
Search Options - Options for
vector_search_with. - Weighted
Path - A path with an associated total weight, returned by weighted path algorithms.
- Write
Txn - A read-write transaction on the graph.
Enums§
- Boolean
Mode - Boolean candidate-set filtering for multi-term queries.
- Cypher
Error - Structured query engine errors representing all parsing, optimization, planning, and runtime execution faults.
- Cypher
Type - The declared Cypher type of a procedure argument or output field.
- Degree
Direction - The direction of edges to count for degree centrality.
- Error
- Fusion
Strategy - Strategy for fusing vector and text relevance scores.
- Language
- Supported languages for Full-text Search indexing and stemming.
- Link
Prediction Metric - Which score
Graph::link_prediction_scorecomputes for a pair of nodes. - PropCmp
- A comparison operator for [
PropColumns::cmp_mask], the typed in-column predicate evaluation behindGraph::nodes_prop_cmp_mask. - Prop
Value - A typed property value used in index lookups and range queries.
- Retrieval
Error - Structured errors representing all hybrid retrieval faults.
- Text
Error - Vector
Error - Structured errors representing all vector search and indexing faults.
- Vector
Metric - Distance metric for the vector index.
- Vector
Quantization - Quantization format for in-memory vector storage.
Constants§
- ID_
GROUP_ ABSENT - The slot value in
IdGroupCodes::codesfor a node id that does not exist (an allocation hole, or an id past the array).
Traits§
- Graph
Query Ext - Extension trait to execute Cypher queries on the
Graphhandle. - Scorer
- Relevance scoring strategy for full-text search.
- Text
Graph Ext - Full-text search operations for
Graph. - Text
Index Ext - Text index lifecycle operations for
Graph. - Vector
Graph Ext - Vector search operations for
Graph.
Functions§
- retrieve
- Wraps a vector search to
kseeds and ahops-hop undirected BFS expansion into one subgraph materialization. - retrieve_
hybrid - Merges vector search seeds with full-text search seeds, fuses their scores
using
opts.fusion, then expands via undirected BFS. - retrieve_
with - Full retrieve with configurable options.