summaryrefslogtreecommitdiff
path: root/logical_search.py
diff options
context:
space:
mode:
Diffstat (limited to 'logical_search.py')
-rw-r--r--logical_search.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/logical_search.py b/logical_search.py
index b6d7479..2cbe0c7 100644
--- a/logical_search.py
+++ b/logical_search.py
@@ -104,6 +104,8 @@ class Corpus(object):
... )
>>> c.query('author:Scott and important')
{1}
+ >>> c.query('*')
+ {1, 2, 3}
"""
def __init__(self) -> None:
@@ -211,6 +213,8 @@ class Corpus(object):
tag1 and key:*
"""
+ if query == '*':
+ return set(self.documents_by_docid.keys())
try:
root = self._parse_query(query)
except ParseError as e: