Repository navigation
Description
Reporting this as a follow-up rather than a new defect: the behaviour is exactly what #4732 describes, and it still happens on 26.7.2 — a release after that issue's 26.7.1 milestone. Adding it separately because a comment on a closed issue is easy to miss, and because the new part here is what I could not reproduce.
Environment
- ArcadeDB Server 26.7.2, build
7059e543a612de85151195dae556d849561f17c5/1783565728762/main - JVM: OpenJDK 64-Bit Server VM, Temurin 21.0.11+10 (
openjdk version "21.0.11" 2026-04-21 LTS) - Official
arcadedata/arcadedb:26.7.2container, single server, no encryption at rest - Affected type: vertex type, one bucket, 6769 records, one indexed
STRINGproperty, ~3.7 MB of text total, average length ~800 chars. Rows are written in an SCD2 pattern — repeatedly inserted and updated over several months.
What happens
CREATE INDEX ... FULL_TEXT over the populated type reports every row as indexed:
{"operation":"create index","name":"ftTaskHist","type":"FULL_TEXT",
"created":true,"totalIndexed":6754}
but the index does not contain them. Comparing a scan against the index on the same field, same type, same term:
| term | note_md LIKE '%term%' |
SEARCH_INDEX('ftTaskHist', 'term') |
|---|---|---|
LORE |
718 | 6 |
релиз |
183 | 1 |
The handful that do match are rows written after the index was created, which is exactly the description in #4732: pre-existing rows are counted but never become matchable.
A second full-text index in the same database, on a smaller type (248 rows), was re-created with the identical statement at the same time and came out correct.
REBUILD INDEX also still loses the index name
The obvious repair still fails, and in a way worth calling out separately:
REBUILD INDEX `ftTaskHist`;
-- {"operation":"rebuild index","indexes":["ftTaskHist"],
-- "totalIndexed":6754,"recordsMisplaced":0}
SELECT count(*) FROM TaskHist WHERE SEARCH_INDEX('ftTaskHist','…') = true;
-- SchemaException: Index with name 'ftTaskHist' was not foundAfter the rebuild the explicitly named index is gone and an auto-named one (TaskHist[note_md]) has taken its place. Applications that resolve indexes by name — the only way to use SEARCH_INDEX — silently lose the feature. This may be the same area as #5765 / #5675.
Prefix queries throw NPE while term queries keep answering
On an index in this state, term queries return their (wrong, low) counts, but prefix queries fail:
SELECT count(*) FROM TaskHist WHERE SEARCH_INDEX('ftTaskHist','zzz*') = true;
-- {"error":"Error on transaction commit",
-- "exception":"java.lang.NullPointerException","detail":"java.lang.NullPointerException"}The same query shape returns 0 without error on a healthy index in the same database.
#5118 describes an NPE of the same shape (an unchecked null from IndexCursor.next()) but limits it to fuzzy (~) queries and states prefix and wildcard queries are unaffected. Here it is the prefix path, on 26.7.2 — the release that closed #5118 — so it may be a second occurrence of the same unchecked null.
This is what made the problem visible at all. For a week the term queries kept answering, just with far fewer results than the data contains, and nothing indicated a failure.
What I could NOT reproduce
This is the part I would most like help narrowing. On the same server and version, a freshly created type behaves correctly in every variation I tried — in each case CREATE INDEX ... FULL_TEXT over pre-existing rows produced a fully working index (term query matched all seeded rows; prefix query returned 0 without error):
| variation | rows | text volume | result |
|---|---|---|---|
| document type, short bodies | 10 / 500 / 2000 / 6000 | small | correct |
same + RussianAnalyzer / BM25 metadata |
6000 | small | correct |
rows whose indexed property is NULL |
6300 | small | correct |
after 3 full-table UPDATEs and a partial DELETE |
6000 | small | correct |
vertex type with an additional NOTUNIQUE index |
6000 | small | correct |
| long bodies | 6000 | 14.3 MB | correct |
| high term cardinality (~180 000 distinct terms) | 6000 | moderate | correct |
| larger row counts | 7000 / 8000 / 10 000 | small | correct |
long Cyrillic bodies + RussianAnalyzer / BM25 |
7000 | 19.9 MB | correct |
So none of row count, text volume, vocabulary size, NULLs, the analyzer, vertex-vs-document, a secondary index, or prior updates and deletes is sufficient on its own — including at volumes several times larger than the affected type. The scratch database used for these runs was dropped afterwards.
The only thing I have found that distinguishes the affected types is age: they are types that have accumulated and churned records over months, rather than being seeded in one go.
Questions
- Is BUG: FULL_TEXT index (re)build over existing data is broken -
CREATE INDEXon a populated type indexes nothing matchable, andREBUILD INDEXcrashes and drops the index #4732 expected to be fully fixed as of 26.7.2, or does the remaining part fall under Index create regression #5675 / Follow-ups from #5675: ManualIndexBuilder still silently drops indexes, plus three smaller items #5765 (milestone 26.8.1, not yet released)? If theTypeIndexBuilderwork in Index create regression #5675 is expected to cover this, I am happy to retest againstmainand report back. - Is there a supported way to inspect a FULL_TEXT index's actual contents (entry count, segment layout), so that "the index does not cover its type" can be detected directly rather than by querying for a known term? I can run anything diagnostic against the affected instance.
- Should
REBUILD INDEXpreserve an explicitly given index name? Losing it silently disables every name-based lookup.
Why this matters beyond the bug
An index in this state is worse than a missing one. The query succeeds, returns a plausible subset, and nothing in the response says most of the corpus was not searched — while CREATE INDEX reporting totalIndexed: 6754 actively suggests the opposite. We only noticed because of the NPE on the prefix path; had that path not crashed, the search would still be quietly returning a fraction of its corpus.
Activity
fix(#5791): REBUILD INDEX * also loses a named index's identity on si…
test(#5791): cover the multi-bucket no-regression case for REBUILD IN…
fix(#5791): REBUILD INDEX preserves an explicitly-named FULL_TEXT/GEO…
lvca commentedon Aug 7, 2026
Fixed in #5925 (merged 9930864).
Confirmed and fixed: `REBUILD INDEX ` and `REBUILD INDEX *` both dropped and recreated a `TypeIndex` (or its bucket sub-indexes) without carrying the logical index's own name through. Most visible on a single-bucket type (the common default): dropping its one-and-only bucket sub-index also drops the wrapping `TypeIndex` (`LocalSchema.dropIndex`), and the rebuild minted a fresh, unnamed one instead of reusing the original name - silently reverting an explicitly-named `FULL_TEXT`/`GEOSPATIAL`/etc. index to the auto-derived `typeName[properties]` form, breaking `SEARCH_INDEX` and every other name-based lookup.
Did not reproduce on
main: the core "`CREATE INDEX ... FULL_TEXT` over pre-existing churned data indexes nothing matchable" defect, and the NPE on prefix queries against a churned index. A stress test replaying the reported SCD2-style churn pattern (~6800 rows, growing updates forcing placeholder relocations, deletes, crossing the periodic build-batch-commit boundary) shows every row matchable and no NPE - both already fixed by prior work (#4732's build-through-put()rewrite, and #5635'sIndexCursorcontract change makingnext()never return null).Follow-up filed for a related, out-of-scope defect the review surfaced: #5934 (
CHECK DATABASE FIXhas the same name-loss issue, plus drops FULL_TEXT/GEOSPATIAL settings entirely).fix(#12774): a derived index name is not carried in the index metadat…