We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 841ee0d commit 352d5a0Copy full SHA for 352d5a0
1 file changed
everyfind/indexer.py
@@ -105,6 +105,18 @@ def search_files(self, pattern: str) -> List[str]:
105
)
106
return [row[0] for row in cursor.fetchall()]
107
108
+ def search(self, pattern: str, limit: Optional[int] = None) -> List[str]:
109
+ """Compatibility wrapper for older API expecting `search`.
110
+
111
+ Args:
112
+ pattern: search substring or pattern
113
+ limit: optional result limit (returns first `limit` matches)
114
+ """
115
+ results = self.search_files(pattern)
116
+ if limit is not None:
117
+ return results[:limit]
118
+ return results
119
120
def clear_index(self) -> None:
121
"""Clear all entries from the index."""
122
if self.conn is None:
0 commit comments