Previous topic

2.1.7.1.5. solrclient.SOLRSearchResponseIterator

Next topic

2.1.7.1.7. solrclient.SOLRValuesResponseIterator

This Page

2.1.7.1.6. solrclient.SOLRSubsampleResponseIterator

class solrclient.SOLRSubsampleResponseIterator(client, q, fq=None, fields='*', pagesize=100, nsamples=10000, transformer=<solrclient.SOLRRecordTransformer object at 0x101d94490>)

Returns a pseudo-random subsample of the result set. Works by calculating the number of pages required for the entire data set and taking a random sample of pages until nsamples can be retrieved. So pages are random, but records within a page are not.

__init__(client, q, fq=None, fields='*', pagesize=100, nsamples=10000, transformer=<solrclient.SOLRRecordTransformer object at 0x101d94490>)

Methods

__init__(client, q[, fq, fields, pagesize, ...])
next() Overrides the default iteration by sequencing through records within a page
processRow(row) Override this method in derived classes to reformat the row response