|
a/tests/pythonapi/doc.py |
|
b/tests/pythonapi/doc.py |
|
... |
|
... |
34 |
for fld in ('title', 'testfield', 'filename'):
|
34 |
for fld in ('title', 'testfield', 'filename'):
|
35 |
print("getattr(doc, %s) -> [%s]"%(fld,utf8string(getattr(doc, fld))))
|
35 |
print("getattr(doc, %s) -> [%s]"%(fld,utf8string(getattr(doc, fld))))
|
36 |
print("doc.get(%s) -> [%s]"%(fld,utf8string(doc.get(fld))))
|
36 |
print("doc.get(%s) -> [%s]"%(fld,utf8string(doc.get(fld))))
|
37 |
print("\nfor fld in sorted(doc.keys()):")
|
37 |
print("\nfor fld in sorted(doc.keys()):")
|
38 |
for fld in sorted(doc.keys()):
|
38 |
for fld in sorted(doc.keys()):
|
|
|
39 |
# Sig keeps changing and makes it impossible to compare test results
|
|
|
40 |
if fld != 'sig':
|
39 |
print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld))))
|
41 |
print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld))))
|
40 |
print("\nfor k,v in sorted(doc.items().items()):")
|
42 |
print("\nfor k,v in sorted(doc.items().items()):")
|
41 |
for k,v in sorted(doc.items().items(), key=lambda itm: itm[0]):
|
43 |
for k,v in sorted(doc.items().items(), key=lambda itm: itm[0]):
|
|
|
44 |
# Sig keeps changing and makes it impossible to compare test results
|
|
|
45 |
if k != 'sig':
|
42 |
print(utf8string("[%s] -> [%s]" % (k, v)))
|
46 |
print(utf8string("[%s] -> [%s]" % (k, v)))
|
43 |
|
47 |
|
44 |
print("\nAccented query:")
|
48 |
print("\nAccented query:")
|
45 |
uqs = u('title:"\u00e9t\u00e9 \u00e0 no\u00ebl"')
|
49 |
uqs = u('title:"\u00e9t\u00e9 \u00e0 no\u00ebl"')
|
46 |
print("User query [%s]"%utf8string(uqs))
|
50 |
print("User query [%s]"%utf8string(uqs))
|
47 |
nres = query.execute(uqs, stemming=0)
|
51 |
nres = query.execute(uqs, stemming=0)
|