Skip to content

Commit

Permalink
k
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Jan 5, 2025
1 parent 90b8d50 commit 2251093
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 1 addition & 11 deletions backend/onyx/document_index/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def index(

class Deletable(abc.ABC):
"""
Class must implement the ability to delete document by their unique document ids.
Class must implement the ability to delete document by a given unique document id.
"""

@abc.abstractmethod
Expand All @@ -227,16 +227,6 @@ def delete_single(self, doc_id: str) -> int:
"""
raise NotImplementedError

# @abc.abstractmethod
# def delete(self, doc_ids: list[str]) -> None:
# """
# Given a list of document ids, hard delete them from the document index

# Parameters:
# - doc_ids: list of document ids as specified by the connector
# """
# raise NotImplementedError


class Updatable(abc.ABC):
"""
Expand Down
4 changes: 3 additions & 1 deletion backend/scripts/force_delete_connector_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def _unsafe_deletion(
break

document_ids = [document.id for document in documents]
# document_index.delete(doc_ids=document_ids)
for doc_id in document_ids:
document_index.delete_single(doc_id)

delete_documents_complete__no_commit(
db_session=db_session,
document_ids=document_ids,
Expand Down

0 comments on commit 2251093

Please sign in to comment.