Skip to content

Commit b2bf880

Browse files
committed
chore: remove debug logging and simplify deletePointsByFilePath
- Removed unnecessary try-catch wrapper in deletePointsByFilePath - Removed debug console.log statements from deletion methods - Code is cleaner and more production-ready
1 parent 2a49fdb commit b2bf880

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/services/code-index/vector-store/qdrant-client.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,7 @@ export class QdrantVectorStore implements IVectorStore {
414414
* @param filePath Path of the file to delete points for
415415
*/
416416
async deletePointsByFilePath(filePath: string): Promise<void> {
417-
try {
418-
return await this.deletePointsByMultipleFilePaths([filePath])
419-
} catch (error) {
420-
// Error is already handled in deletePointsByMultipleFilePaths
421-
// This is just for consistency in case the method is called directly
422-
console.error(`[QdrantVectorStore] Error in deletePointsByFilePath for ${filePath}:`, error)
423-
// Re-throw to maintain the interface contract
424-
throw error
425-
}
417+
return this.deletePointsByMultipleFilePaths([filePath])
426418
}
427419

428420
async deletePointsByMultipleFilePaths(filePaths: string[]): Promise<void> {
@@ -464,20 +456,13 @@ export class QdrantVectorStore implements IVectorStore {
464456
return { must: mustConditions }
465457
})
466458

467-
// Log the paths being deleted for debugging
468-
console.log(
469-
`[QdrantVectorStore] Attempting to delete points for ${filePaths.length} file(s) from collection "${this.collectionName}"`,
470-
)
471-
472459
// Use 'should' to match any of the file paths (OR condition)
473460
const filter = filters.length === 1 ? filters[0] : { should: filters }
474461

475462
await this.client.delete(this.collectionName, {
476463
filter,
477464
wait: true,
478465
})
479-
480-
console.log(`[QdrantVectorStore] Successfully deleted points for ${filePaths.length} file(s)`)
481466
} catch (error: any) {
482467
// Extract more detailed error information
483468
const errorMessage = error?.message || String(error)

0 commit comments

Comments
 (0)