Repository navigation
docs(fts): document full-text search shipped in v5.3.0 - #326
Open
CaffeinatedCoder wants to merge 1 commit into
Open
CaffeinatedCoder wants to merge 1 commit into
CaffeinatedCoder wants to merge 1 commit into
Conversation
Full-text search with BM25 ranking (EntglDb#70, EntglDb#177) shipped in 5.3.0 but the README did not mention it. Adds a section next to the spatial one covering HasFullTextIndex, LINQ FullTextMatch, the ranked FullTextSearchAsync on typed and dynamic collections, CreateFullTextIndexAsync, and a note on ranking and limitations, plus one line under Advanced Indexing. Refs EntglDb#70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #70 (closed; shipped in 5.3.0 by #177).
Problem
Full-text search with BM25 ranking shipped in 5.3.0, but only CHANGELOG.md mentions it. The README has no section for it, so
HasFullTextIndex,FullTextMatchandFullTextSearchAsyncare undocumented.Change
README.md only:
Full-Text Search (BM25).HasFullTextIndex(x => x.Body)and its default nameidx_fts_{Property};FullTextMatch;FullTextSearchAsync(indexName, query, k, matchAllTerms)returningFullTextSearchResult<T>(Document,Score);CreateFullTextIndexAsync(x => ...)at runtime;DynamicCollectionform:CreateFullTextIndexAsync("field")(default nameidx_fts_{field}) andFullTextSearchAsync.FullTextIndex), and scores compare only within one search (FullTextSearchResult);FullTextMatchuses the index (IndexOptimizer, and the planner tests inFullTextSearchTests);FullTextAnalyzer);BlqlFilterParser);HasFullTextIndexandCreateFullTextIndexAsync).No other files touched. There is no roadmap row or per-version table for full-text to update, and
docs/has no per-feature guides, so there is no new guide.Tests
The README samples were compiled and run in a scratch console app (
net10.0, referencingBLite.Core,BLite.Bsonand the source generator as an analyzer, astests/BLite.Shareddoes). The app contained both code blocks verbatim and anArticlemodel with a generatedDocumentDbContext:FullTextMatch("quick fox")returned the two documents containing both terms.FullTextSearchAsync(..., k: 10)returned them ranked by score. WithmatchAllTerms: falseit also returned a document containing onlyfox, with a lower score."Café, au lait!".FullTextMatch("cafe LAIT")istrue, and the same filter in LINQ returned that document.CreateFullTextIndexAsync(x => x.Title)createdidx_fts_Titlenext toidx_fts_Body.CreateFullTextIndexAsync("text")createdidx_fts_text, andFullTextSearchAsyncwithTryGetString("title", ...)printed the matching note.No compiler warnings came from the sample code.
🤖 Generated with Claude Code