Adding doctests. Also added a logging filter.
[python_utils.git] / logical_search.py
index 805ec223010b93b2a1bf68e1fdee9467daac14aa..3ebaee5652040bef7d67620fb0e69f028c55c986 100644 (file)
@@ -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}
     """