Repository navigation
v1.14.5
#73
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
NeoSQLite v1.14.5 Release Notes
TL;DR
NeoSQLite v1.14.5 is a feature enhancement release that adds native FTS5 BM25 text relevance scoring to aggregation pipelines and enables
$push/$addToSetwith nested object expressions in$groupstages.Key Features: This release implements
$meta: "textScore"for native text search relevance scoring using SQLite's BM25 algorithm, and adds full support for$pushand$addToSetwith expression objects to collect nested structures during grouping operations.$groupstages that collect nested objects.Overview
This release focuses on aggregation pipeline capabilities and native text scoring:
$projectand$addFieldsstages.$pushand$addToSetnow support expression objects to collect nested documents during$group.High Severity Enhancements
Added $meta: textScore for Native FTS5 Relevance Scoring
Feature: Native FTS5 BM25 text relevance scoring is now available in aggregation pipelines via
{$meta: "textScore"}.How It Works: During
$textsearch stages, NeoSQLite captures the FTS5 BM25 score and stores it in the document's JSON data. When$meta: "textScore"is used in$projector$addFields, the score is extracted and made available for sorting and filtering.SQL Implementation:
$textmatch,-bm25(fts_table)is computed and stored as_textScorein the document JSON$meta: "textScore"in$project/$addFieldsextracts the stored score viajson_extract(data, '$._textScore')Impact:
Example:
With $addFields:
Kill Switch Support:
Medium Severity Enhancements
Added $push and $addToSet with Expression Objects
Feature:
$pushand$addToSetnow support expression objects to collect nested documents during$groupstages.Problem: Previously,
$pushwith expressions like{'$push': {'title': '$title', 'author': '$author'}}would raiseNotImplementedErrorand fall back to Python evaluation.Solution: Implemented native SQL support that builds
json_object()expressions for nested document collection:$push/$addToSetjson_object()with field references and literal valuesjson_group_array()to collect objects into arraysSQL Logic:
Impact:
$pushwith expressions → Python fallback$pushwith expressions → Native SQL collectionExample:
With Literal Values:
$addToSet with Deduplication:
Low Severity Improvements
Python Fallback Support for $meta
Python Evaluator Enhancement — Added
$metaoperator support to the Python expression evaluator for consistency with native SQL path. Returns stored_textScorevalue or 0.0 as default.Comprehensive Test Coverage
New Tests Added — 8 comprehensive unit tests covering all new features:
$meta: textScorein various scenarios (basic, $addFields, no FTS index, multiple indexes)$push/$addToSetwith expressions (basic, literals, $addToSet deduplication, complex pipelines)Test Statistics
Unit Tests
API Comparison Tests
NeoSQLite vs MongoDB
Installation
pip install neosqlite # or poetry installMigration Guide
Upgrading from v1.14.4
This is a non-breaking feature release. All existing code continues to work without modification.
For Users Who Need Text Relevance Scoring
If you were using Python-based text relevance scoring:
For Users Who Need Nested Object Collection
If you were using Python post-processing to build nested structures:
Credits
Feature enhancements developed as part of the NeoSQLite project, based on community requests for advanced aggregation pipeline capabilities.
Special thanks to the optimization teams who identified these feature gaps during database performance tuning and aggregation pipeline work.
NeoSQLite v1.14.5 — Native FTS5 BM25 Scoring and Nested Object Collection in Aggregation Pipelines.
This discussion was created from the release v1.14.5.
All reactions