Commits

Matt Chaput  committed 6dd85af

Removed debug prints.

  • Participants
  • Parent commits 357c255

Comments (0)

Files changed (3)

File src/whoosh/filedb/pools.py

         
         for name in sorted(self.fieldnames):
             con = self._con(name)
-            #t = now()
-            #con.execute("create index postix on postings (token, docnum)")
-            #print "Create index:", name, now() - t
-            
-            print "Reading", name
-            t = now()
             for text, docnum, weight, valuestring in con.execute("select * from postings order by token, docnum"):
                 yield (name, text, docnum, weight, valuestring)
             con.close()
             os.remove(self._field_filename(name))
-            print "Readback:", name, now() - t
         
         if self._using_tempdir and self.dir:
             try:

File tests/test_sorting.py

             w.add_document(ev=u("a"), **doc)
         w.commit(merge=False)
 
-def try_sort(sortedby, key, q=None, limit=None, reverse=False, debug=False):
+def try_sort(sortedby, key, q=None, limit=None, reverse=False):
     if q is None: q = query.Term("ev", u("a"))
     
     correct = [d["id"] for d in sorted(docs, key=key, reverse=reverse)][:limit]
             with ix.searcher() as s:
                 r = s.search(q, sortedby=sortedby, limit=limit, reverse=reverse)
                 rids = [d["id"] for d in r]
-                if debug:
-                    print "fn=", fn
-                    print "rids=", rids
-                    print "correct=", correct
                 assert_equal(rids, correct)
 
 
         r = s.search(query.Every(), groupedby=facet)
         # If you specify a facet withou a name, it's automatically called
         # "facet"
-        print r.groups("facet")
         assert_equal(r.groups("facet"), {"a-c": [1, 2, 4],
                                          "d-f": [5, 7, 8],
                                          "g-i": [0, 3, 6]})
     with ix.searcher() as s:
         q = query.And([query.Term("text", u("alfa")), query.Term("text", u("bravo"))])
         results = s.search(q, sortedby=fnfacet)
-        print results.top_n
         r = [hit["text"] for hit in results]
         for t in r[:10]:
             tks = t.split()

File tests/test_spelling.py

     add_spelling(ix, ["text1", "text2"])
     
     with ix.reader() as r:
-        print r.dawg
         assert r.has_word_graph("text1")
         assert r.has_word_graph("text2")
         
     ix.optimize()
     with ix.reader() as r:
         assert r.is_atomic()
-        
         assert_equal(list(r.lexicon("text")), sorted(domain))
-        
-        print ix.storage.list()
         assert r.has_word_graph("text")
         words = list(dawg.flatten(r.word_graph("text")))
         assert_equal(words, sorted(domain))