Skip to content

feat: prune stale vectorized symbols on re-index #140

@jordanpartridge

Description

@jordanpartridge

When code is refactored and symbols are deleted, their vectors remain in the Qdrant code collection indefinitely. This leads to stale search results pointing to code that no longer exists.

SymbolIndexService::detectChanges() already tracks changed/new/deleted files. The reindex:all and vectorize-code commands should use this to delete vectors for removed symbols after re-indexing.

Approach:

  • After incremental index, compare old vs new symbol IDs for changed files
  • Delete Qdrant points for symbols that no longer exist
  • Track deletion count in the progress output

Files:

  • app/Services/CodeIndexerService.php
  • app/Commands/ReindexAllCommand.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions