|
a/src/python/samples/recollqsd.py |
|
b/src/python/samples/recollqsd.py |
|
... |
|
... |
11 |
|
11 |
|
12 |
nres = query.executesd(q)
|
12 |
nres = query.executesd(q)
|
13 |
print "Result count: ", nres
|
13 |
print "Result count: ", nres
|
14 |
if nres > 10:
|
14 |
if nres > 10:
|
15 |
nres = 10
|
15 |
nres = 10
|
16 |
while query.next >= 0 and query.next < nres:
|
16 |
for i in range(nres):
|
17 |
doc = query.fetchone()
|
17 |
doc = query.fetchone()
|
18 |
print query.next
|
18 |
print query.next if type(query.next) == int else query.rownumber
|
19 |
for k in ("url", "mtime", "title", "author", "abstract"):
|
19 |
for k in ("url", "mtime", "title", "author", "abstract"):
|
20 |
print k, ":", getattr(doc, k).encode('utf-8')
|
20 |
print k, ":", getattr(doc, k).encode('utf-8')
|
21 |
#abs = db.makeDocAbstract(doc, query).encode('utf-8')
|
21 |
#abs = db.makeDocAbstract(doc, query).encode('utf-8')
|
22 |
#print abs
|
22 |
#print abs
|
23 |
print
|
23 |
print
|