Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Saller <bcsaller@objectrealms.net>2007-05-23 20:10:50 (GMT)
committer Benjamin Saller <bcsaller@objectrealms.net>2007-05-23 20:10:50 (GMT)
commitaad8dcabbdf1a262742325f3bdbddbf77589ba5c (patch)
treefb40277cd047eb484f746ac29e9ccdfea9b88250 /tests
parent50abd7b5a34d8107abb49fe1635c719b2f80b010 (diff)
more modular internal/external indexing support
renamed file= in kwargs to filelike sometimes this is a file, StringIO or a filename
Diffstat (limited to 'tests')
-rw-r--r--tests/query.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/query.txt b/tests/query.txt
index 6a86c8f..ff65455 100644
--- a/tests/query.txt
+++ b/tests/query.txt
@@ -180,7 +180,7 @@ manager provided the mime_type Property of the Content is one
understood by the index.
>>> from StringIO import StringIO
->>> qm.fulltext_index(a, StringIO("this is my content, hear it roar"))
+>>> qm.update(a, {}, StringIO("this is my content, hear it roar"))
>>> qm.find(fulltext="roar") == ([a], 1)
True
@@ -196,7 +196,7 @@ Calls to update() and create() both take an optional file argument
which will update the fulltext indexed content with the new value of
file.
->>> qm.update(a, file=StringIO("different text"))
+>>> qm.update(a, filelike=StringIO("different text"))
The new content will be found
>>> qm.find(fulltext="different", author="Benjamin") == ([a], 1)
@@ -209,7 +209,7 @@ And the old content is not.
Passing a filename for file works as well. Files can be in a variety
of binary formats include PDF.
->>> qm.update(a, file="test.doc")
+>>> qm.update(a, filelike="test.doc")
>>> qm.find(fulltext="roar", author="Benjamin")
([], 0)
>>> qm.find(fulltext="amazed", author="Benjamin") == ([a], 1)
@@ -217,16 +217,16 @@ True
We have converters for DOC, PDF and ODT by default
->>> qm.update(a, file="test.pdf")
+>>> qm.update(a, filelike="test.pdf")
>>> qm.find(fulltext="peek", author="Benjamin") == ([a], 1)
True
->>> qm.update(a, file="test.odt")
+>>> qm.update(a, filelike="test.odt")
>>> qm.find(fulltext="amazed", author="Benjamin") == ([a], 1)
True
->>> qm.update(a, file="test.doc")
+>>> qm.update(a, filelike="test.doc")
>>> qm.find(fulltext="amazed", author="Benjamin") == ([a], 1)
True