def query_iteratively(self, searchAreaWkt, query, count=<NUM_LIT:100>, ttl='<STR_LIT>', index=default_index):
search_area_polygon = from_wkt(searchAreaWkt)<EOL>left, lower, right, upper = search_area_polygon.bounds<EOL>params = {<EOL>"<STR_LIT:q>": query,<EOL>"<STR_LIT:count>": min(count,<NUM_LIT:1000>),<EOL>"<STR_LIT>": ttl,<EOL>"<STR_LIT:left>": left,<EOL>"<STR_LIT:right>": right,<EOL>"<STR_LIT>": lower,<EOL>"<STR_LIT>": upper<EOL>}<EOL>url = self.query_index_page_url % index if index else self.query_page_url<EOL>r = self.gbdx_connection.get(url, params=params)<EOL>r.raise_for_status()<EOL>page = r.json()<EOL>paging_id = page['<STR_LIT>']<EOL>item_count = int(page['<STR_LIT>'])<EOL>data = page['<STR_LIT:data>']<EOL>num_results = <NUM_LIT:0><EOL>for vector in data:<EOL><INDENT>num_results += <NUM_LIT:1><EOL>if num_results > count: break<EOL>yield vector<EOL><DEDENT>if num_results == count:<EOL><INDENT>return<EOL><DEDENT>while paging_id and item_count > <NUM_LIT:0> and num_results < count:<EOL><INDENT>headers = {'<STR_LIT:Content-Type>':'<STR_LIT>'}<EOL>data = {<EOL>"<STR_LIT>": paging_id,<EOL>"<STR_LIT>": ttl<EOL>}<EOL>r = self.gbdx_connection.post(self.page_url, headers=headers, data=data)<EOL>r.raise_for_status()<EOL>page = r.json()<EOL>paging_id = page['<STR_LIT>']<EOL>item_count = int(page['<STR_LIT>'])<EOL>data = page['<STR_LIT:data>']<EOL>for vector in data:<EOL><INDENT>num_results += <NUM_LIT:1><EOL>if num_results > count: break<EOL>yield vector<EOL><DEDENT><DEDENT>
Perform a vector services query using the QUERY API
(https://gbdxdocs.digitalglobe.com/docs/vs-query-list-vector-items-returns-default-fields)

Args:
    searchAreaWkt: WKT Polygon of area to search
    query: Elastic Search query
    count: Maximum number of results to return
    ttl: Amount of time for each temporary vector page to exist

Returns:
    generator of vector results