def __iter__(self):
clone = copy.deepcopy(self)<EOL>count = clone.count()<EOL>self.want_deleted = clone.want_deleted<EOL>chunk_size = ceil(count / float(self._cfg['<STR_LIT>']))<EOL>last_chunk_size = count % self._cfg['<STR_LIT>']<EOL>chunk_size_list = [(i, self._cfg['<STR_LIT>']) for i in range(int(chunk_size))]<EOL>if last_chunk_size:<EOL><INDENT>chunk_size_list.append((chunk_size_list.pop()[<NUM_LIT:0>], last_chunk_size))<EOL><DEDENT>if '<STR_LIT:start>' in self._solr_params:<EOL><INDENT>self._cfg['<STR_LIT:start>'] = self._solr_params['<STR_LIT:start>']<EOL><DEDENT>page_list = []<EOL>with con.ThreadPoolExecutor(max_workers=<NUM_LIT:10>) as exc:<EOL><INDENT>future_page_list = {exc.submit(self.get_from_solr, copy.deepcopy(self), page, row_size):<EOL>(page, row_size) for (page, row_size) in chunk_size_list}<EOL>for multiget_page_list in con.as_completed(future_page_list):<EOL><INDENT>page_list.append(multiget_page_list.result())<EOL><DEDENT><DEDENT>exc.shutdown()<EOL>pages = []<EOL>with con.ThreadPoolExecutor(max_workers=<NUM_LIT:5>) as exc:<EOL><INDENT>future_objs = {exc.submit(self.riak_multi_get, key_list_tuple): key_list_tuple for<EOL>_, key_list_tuple in page_list}<EOL>for riak_objs in con.as_completed(future_objs):<EOL><INDENT>objs = riak_objs.result()<EOL>if not self.ordered:<EOL><INDENT>for obj in objs:<EOL><INDENT>yield obj[<NUM_LIT:1>], obj[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pages.extend(objs)<EOL><DEDENT><DEDENT><DEDENT>if pages:<EOL><INDENT>objs = dict(pages)<EOL>for _, key_list_tuple in sorted(page_list):<EOL><INDENT>for _, _, key in key_list_tuple:<EOL><INDENT>yield objs.get(key), key<EOL><DEDENT><DEDENT><DEDENT>
Gets riak keys from solr an ordered and with these keys takes riak objs' keys and data from
riak. While taking data from riak executes threaded. According to demanded type
(ordered, unordered) yields key and data.

Unordered type:
    Returns data and key which are first come regardless of solr order.

Ordered type:
    Key and value tuples are put to a list. List is transformed to dict. And according to
    solr order, yields key and data.

Returns:
    tuple: obj's data, obj's key