Skip to content

Commit 33d4a02

Browse files
committed
add comment to _find_documents_with_idx method
1 parent 10fa22d commit 33d4a02

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Search_Engine/backend.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ def find_documents(self, search_term):
115115
return self._find_documents_with_idx(common_idx_of_docs)
116116

117117
def _find_documents_with_idx(self, idxs):
118+
"""
119+
Returns - list[str]: the list of documents with the idxs
120+
Input - list of idxs
121+
---------
122+
- use the class-level connection object to retrieve the documents that
123+
have the idx in the input list of idxs.
124+
- retrieve and return these documents as a list
125+
"""
118126
idxs = list(idxs)
119127
cur = self.conn.cursor()
120128
sql="SELECT document FROM IdToDoc WHERE id in ({seq})".format(

0 commit comments

Comments
 (0)