Repository navigation
Conversation
This was referenced Oct 14, 2026
DROP_FTS_INDEX left the index's tokenize macro behind, so an index created again under the same name reused it: rows built by the CREATE were tokenized with the old ignore_pattern or tokenizer while rows inserted later used the new one. DROP MACRO's WAL replay is fixed (LadybugDB/ladybug#1165), so DROP_FTS_INDEX now drops the macro and reports "Index ... has been dropped.", and CREATE_FTS_INDEX replaces a tokenize macro that already exists, from IMPORT DATABASE, an interrupted CREATE, or a drop by an earlier version. The macro is dropped only when it exists, because DROP MACRO IF EXISTS throws for a missing macro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DROP_FTS_INDEX now also drops the tokenize macro and the stopwords copy. The new case drops an index with a stopwords table, reopens without a checkpoint so the drop is replayed, then recreates the index with a new ignore_pattern and finds the row it now indexes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zahariash
force-pushed
the
fix/fts-drop-leftovers
branch
from
October 14, 2026 16:31
8fbc806 to
286c12d
Compare
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.
This work was produced with the help of language models.
Fixes #119.
DROP_FTS_INDEXleft behind the index's tokenize macro. Recreating an index under the same name reused the old macro, so rows built by theCREATEkept the old tokenization while rows inserted later and queries used the new one. The other half of #119, theCREATEfailing on a leftover stopwords copy, is fixed onmainby #104.Fix.
DROP_FTS_INDEXdrops the macro after the index tables and now returnsIndex <name> has been dropped.; the NOTE #104 left there is gone, since LadybugDB/ladybug#1165 fixedDROP MACRO's WAL replay (LadybugDB/ladybug#1163).CREATE_FTS_INDEXreplaces an existing tokenize macro, including the oneschema.cyphercreates duringIMPORT DATABASEand one left by an interruptedCREATE. The macro is dropped only when it exists, becauseDROP MACRO IF EXISTSthrows for a missing macro. Rebased ontomainafter #104; this overlaps #125 increate_fts_index.cpp, and whichever lands second gets rebased.Tests.
drop_recreate.testrecreates an index with a newignore_patternand over a leftover macro, and drops an index with a stopwords table, reopens without a checkpoint so the drop is replayed, and recreates it with a newignore_pattern, which finds12345; these three fail onmain. Its stopwords table and stopwords file cases already pass onmainsince #104 and stay as regression tests.multi_index.testno longer drops the macros beforeIMPORT DATABASE. FTS extension tests: no new failures.