Skip to content

Commit

Permalink
Merge pull request #5 from cclauss/patch-3
Browse files Browse the repository at this point in the history
test_bigfacet.py: print() is a function in Python 3
  • Loading branch information
ZeroCool940711 authored Jan 3, 2024
2 parents 05b91c1 + 36e2091 commit 9144ae3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stress/test_bigfacet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
doc = u" ".join(random.sample(tags, random.randint(10, 20)))
w.add_document(tags=doc)
if not i % 10000:
print i
print now() - t
print(i)
print(now() - t)


ix = index.open_dir(dirname)
with ix.searcher() as s:
tags = list(s.lexicon("tags"))
facet = sorting.FieldFacet("tags", allow_overlap=True)
qtag = random.choice(tags)
print "tag=", qtag
print("tag=", qtag)
q = query.Term("tags", qtag)
r = s.search(q, groupedby={"tags": facet})
print r.runtime
print(r.runtime)

facet = sorting.StoredFieldFacet("tags", allow_overlap=True)
r = s.search(q, groupedby={"tags": facet})
print r.runtime
print(r.runtime)

0 comments on commit 9144ae3

Please sign in to comment.