abhigyanpatwari/GitNexus · error

Search index build failed with an integrity error and the…

Error message

Search index build failed with an integrity error and the analysis was aborted to avoid publishing a broken index: ${ftsResult.error}. The previous index is left intact. Re-run `gitnexus analyze`; if it persists, check the disk for space or corruption.

What it means

Error "Search index build failed with an integrity error and the analysis was aborted to avoid publishing a broken index: ${ftsResult.error}. The previous index is left intact. Re-run `gitnexus analyze`; if it persists, check the disk for space or corruption." thrown in abhigyanpatwari/GitNexus.

When it happens

Trigger: Thrown at gitnexus/src/core/run-analyze.ts:2762 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of abhigyanpatwari/GitNexus@ac9a4e9abd (2026-08-20). Data as JSON: /api/errors/284d48ea6918c3d1. Report an issue: GitHub.

Appendix: source

Thrown at gitnexus/src/core/run-analyze.ts:3529

        onIndexStart: options.verbose
          ? (table, indexName) => log(`FTS: creating ${table}.${indexName}`)
          : undefined,
        onIndexReady: options.verbose
          ? (table, indexName) => log(`FTS: ready ${table}.${indexName}`)
          : undefined,
      });
      if (ftsResult.ok) {
        progress('fts', 90, 'Search indexes ready');
      } else if (ftsFailureIsFatal(ftsResult.failureClass, useAtomicSwap)) {
        // #2658: an IO/rename/checkpoint/corruption failure while building FTS
        // is a genuinely broken build on this disk — not a concurrent writer
        // (the single-writer lock rules that out). ONLY fatal on the atomic-swap
        // path: the graph was built into a throwaway staging DB, so throwing
        // before the swap abandons the staging file and leaves the previous live
        // index intact. On an in-place build the live DB is already mutated and
        // cannot be rolled back by throwing (see ftsFailureIsFatal) — those
        // degrade in the branch below instead.
        throw new Error(
          `Search index build failed with an integrity error and the analysis was aborted ` +
            `to avoid publishing a broken index: ${ftsResult.error}. The previous index is ` +
            `left intact. Re-run \`gitnexus analyze\`; if it persists, check the disk for space ` +
            `or corruption.`,
        );
      } else {
        ftsReady = false;
        ftsSkipReason = 'build-failed';
        log(
          `FTS index build failed (${ftsResult.error}) — keyword search degraded this run. ` +
            'Graph and embeddings analysis completed successfully. Run `gitnexus analyze --repair-fts` to retry.',
        );
        progress('fts', 90, 'Search indexes skipped (build failed)');
      }
    } else if (ftsDisabledReason) {
      log(FTS_DISABLED_MESSAGE);
      progress('fts', 90, 'Search indexes skipped (explicitly disabled)');
    } else {

View on GitHub (pinned to ac9a4e9abd)