summaryrefslogtreecommitdiff
path: root/logical_search.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2021-09-15 09:32:08 -0700
committerScott Gasch <[email protected]>2021-09-15 09:32:08 -0700
commit4c315e387f18010ba0b5661744ad3c792f21d2d1 (patch)
treea5657340bea356aa3aaf2c24b7f2be98bb4bc302 /logical_search.py
parent83c1e0d04fe2e78963c8b508e8b7d0ae03bfcb16 (diff)
Adding doctests. Also added a logging filter.
Diffstat (limited to 'logical_search.py')
-rw-r--r--logical_search.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/logical_search.py b/logical_search.py
index 805ec22..3ebaee5 100644
--- a/logical_search.py
+++ b/logical_search.py
@@ -86,6 +86,16 @@ class Corpus(object):
... reference=None,
... )
... )
+ >>> c.add_doc(Document(
+ ... docid=3,
+ ... tags=set(['urgent']),
+ ... properties=[
+ ... ('author', 'Scott'),
+ ... ('subject', 'car turning in front of you')
+ ... ],
+ ... reference=None,
+ ... )
+ ... )
>>> c.query('author:Scott and important')
{1}
"""