Skip to content

Commit da6082f

Browse files
authored
Merge pull request #359 from ke4roh/cursor_doc
Show an example of how to use cursor traversal
2 parents cf6e49f + f50c065 commit da6082f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ Basic usage looks like:
112112
'hl.fragsize': 10,
113113
})
114114
115+
# Traverse a cursor using its iterator:
116+
for doc in solr.search('*:*',fl='id',cursorMark='*'):
117+
print(doc['id'])
118+
115119
# You can also perform More Like This searches, if your Solr is configured
116120
# correctly.
117121
similar = solr.more_like_this(q='id:doc_2', mltfl='text')

0 commit comments

Comments
 (0)