Skip to content

Release v0.2.0

Latest

Choose a tag to compare

@lnfjpt lnfjpt released this 03 Sep 08:05
· 3 commits to release-v0.2.0 since this release

NeuG v0.2.0

Release Date: 2026-09-03

New Features

1. Unified Index Framework: HNSW Vector Search & Full-Text Search

  • Introduced a unified index framework that supports both approximate vector search and full-text search
  • Added HNSW vector search extension with l2, cosine, and ip metrics
  • Added FTS full-text search extension with BM25 scoring, including multi-column and weighted BM25
  • Added Jieba tokenizer support for Chinese text
    Example:
-- HNSW vector index
CREATE INDEX item_hnsw ON Item USING HNSW (embedding) WITH (metric = 'cosine');
MATCH (n:Item)
RETURN n.id, vector_distance_l2(n.embedding, [0.0, 1.0, 0.0, 0.0]) AS score;

-- FTS full-text index
CREATE INDEX item_fts ON Item USING FTS (text);
MATCH (n:Item)
RETURN n.id, bm25(n.text, 'graph database') AS score;

2. Graph Namespace

  • Added USE NAMESPACE support to scope queries to specific projected graph namespaces
  • Projected graph namespaces allow restricting queries to particular nodes and edges
    Example:
-- Step 1: create a namespace (projected graph view)
CALL project_graph(
    'my_graph',
    {'Person': 'n.age > 20'},
    ['[Person, KNOWS, Person]']
);

-- Step 2: query within the namespace
USE NAMESPACE my_graph
MATCH (n:Person)-[:KNOWS]->(m:Person)
RETURN n.name, m.name;

3. Explicit Transactions

  • Added explicit transaction control across embedded AP, Python, Node.js, and Java bindings
  • Added TP explicit transaction sessions
  • Provided begin_transaction(), commit(), and rollback() APIs
conn.begin_transaction()
conn.execute("CREATE (n:Person {name: 'Alice'})")
conn.commit()

# or rollback
conn.begin_transaction()
conn.execute("DELETE ...")
conn.rollback()

4. Pattern Matching Extension

  • Added pattern_matching extension supporting state-of-the-art subgraph matching algorithms
  • Supports exact match (all results), exact match with early stop, and sampled match

Improvements & Performance

  • Propagate the PARALLEL option to the native CSV reader
  • Optimize indexer performance
  • Replace Arrow CSV/JSON IO with a native reader framework
  • Decouple S3/HTTP IO from Arrow via a curl-based client in httpfs
  • Optimize Node.js test results and nightly test workflow

Bug Fixes

  • Fix CSR capacity error after bulk load
  • Fix "invalid oe offset" when creating a relationship after edge deletion
  • Fix duplicate predicates in cross-product filter pushdown
  • Fix pipeline loss for leading OPTIONAL MATCH and constant-false filters
  • Fix Parquet data loading not using multithreading
  • Fix index reopen issue when extension is unloaded
  • Fix server crash when reading large ZSTD Parquet files

CI/CD & Build

  • Add dedicated release workflows for wheels, Java SDK, and extensions
  • Add npm publish and npm nightly test workflows
  • Add RSS memory leak nightly workflow and tests
  • Optimize CI workflow trigger conditions
  • Refine issue triage workflow

Documentation

  • Add "Building a Code Wiki with Graph" tutorial
  • Update data pipeline tutorial
  • Refine documentation and README "What's Next" section
  • Add Database of Databases listing to README news

Internal Refactoring

  • Unify AP and TP query execution paths and COW write foundations
  • Refactor Session/SessionPool lifecycle and remove query processor
  • Move operationGate out from version manager
  • Make VersionManager runtime-agnostic with AP/TP wait policies
  • Store checkpoints as immutable objects with versioned manifests
  • Implement incremental checkpoint support
  • Extract index DDL to a separate interface
  • Unify compiler catalog with engine schema
  • Correct manual checkpoint behavior for AP and TP
  • Refactor native arch build flags
  • Fix bulk loading performance regression

NeuG v0.2.0

发布日期: 2026-09-03

新特性

1. 统一索引框架:HNSW 向量检索与全文检索

  • 引入统一索引框架,同时支持近似向量检索与全文检索
  • 新增 HNSW 向量检索扩展,支持 l2、cosine、ip 三种距离度量
  • 新增 FTS 全文检索扩展,支持 BM25 评分,包括多列与加权 BM25
  • 新增结巴(Jieba)中文分词器支持

示例:

-- HNSW 向量索引
CREATE INDEX item_hnsw ON Item USING HNSW (embedding) WITH (metric = 'cosine');
MATCH (n:Item)
RETURN n.id, vector_distance_l2(n.embedding, [0.0, 1.0, 0.0, 0.0]) AS score;

-- FTS 全文索引
CREATE INDEX item_fts ON Item USING FTS (text);
MATCH (n:Item)
RETURN n.id, bm25(n.text, 'graph database') AS score;

2. 图命名空间

  • 新增 USE NAMESPACE 支持,可将查询限定在特定的投影图命名空间内
  • 投影图命名空间支持将查询限制在特定的点和边上

示例:

-- 步骤 1:创建命名空间(投影图视图)
CALL project_graph(
    'my_graph',
    {'Person': 'n.age > 20'},
    ['[Person, KNOWS, Person]']
);

-- 步骤 2:在命名空间内查询
USE NAMESPACE my_graph
MATCH (n:Person)-[:KNOWS]->(m:Person)
RETURN n.name, m.name;

3. 显式事务

  • 嵌入式 AP、Python、Node.js、Java 绑定均新增显式事务控制
  • 新增 TP 显式事务会话
  • 提供 begin_transaction()commit()rollback() API
conn.begin_transaction()
conn.execute("CREATE (n:Person {name: 'Alice'})")
conn.commit()

# 或回滚
conn.begin_transaction()
conn.execute("DELETE ...")
conn.rollback()

4. 模式匹配扩展

  • 新增 pattern_matching 扩展,支持最先进的子图匹配算法
  • 支持精确匹配(全部结果)、精确匹配早停、采样匹配三种模式

改进与性能优化

  • PARALLEL 选项传播到原生 CSV 读取器
  • 优化索引器性能
  • 用原生读取框架替换 Arrow CSV/JSON IO
  • httpfs 中通过基于 curl 的客户端将 S3/HTTP IO 与 Arrow 解耦
  • 优化 Node.js 测试结果与每日测试工作流

缺陷修复

  • 修复批量加载后的 CSR 容量错误
  • 修复边删除后创建关系时报 "invalid oe offset" 的问题
  • 修复笛卡尔积过滤器下推中谓词重复的问题
  • 修复前导 OPTIONAL MATCH 与常量假过滤条件下管道丢失的问题
  • 修复 Parquet 数据加载未使用多线程的问题
  • 修复扩展卸载后索引重开的问题
  • 修复读取大型 ZSTD Parquet 文件时服务器崩溃的问题

CI/CD 与构建

  • 新增 wheel、Java SDK 与扩展的专属发布工作流
  • 新增 npm 发布与 npm 每日测试工作流
  • 新增 RSS 内存泄漏每日检测工作流与测试
  • 优化 CI 工作流触发条件
  • 完善 issue 分诊工作流

文档

  • 新增 "Building a Code Wiki with Graph" 教程
  • 更新数据管道(data pipeline)教程
  • 完善文档与 README 的 "What's Next" 部分
  • README 新闻栏目中添加 Database of Databases 收录信息

内部重构

  • 统一 AP 与 TP 的查询执行路径及 COW 写入基础
  • 重构 Session/SessionPool 生命周期,移除 query processor
  • 将 operationGate 从 version manager 中移出
  • VersionManager 运行时无关化,支持 AP/TP 等待策略
  • 检查点改为不可变对象并使用带版本的 manifest 存储
  • 实现增量检查点支持
  • 将索引 DDL 抽取为独立接口
  • 统一编译器 catalog 与引擎 schema
  • 修正 AP 与 TP 的手动检查点行为
  • 重构原生架构(native arch)编译选项
  • 修复批量加载性能回退