Пример #1
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     for r in scroll_query(self.index, self.raw_query):
         yield ESQuerySet.normalize_result(deepcopy(self), r)
Пример #2
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     result = scroll_query(self.index, self.raw_query)
     return ScanResult(result.count,
                       (ESQuerySet.normalize_result(deepcopy(self), r)
                        for r in result))
Пример #3
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     result = scroll_query(self.index, self.raw_query)
     return ScanResult(
         result.count,
         (ESQuerySet.normalize_result(deepcopy(self), r) for r in result)
     )
Пример #4
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     result = scroll_query(self.index,
                           self.raw_query,
                           for_export=self.for_export)
     for r in result:
         yield ESQuerySet.normalize_result(self, r)
Пример #5
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     query = deepcopy(self)
     if query._size is None:
         query._size = SCROLL_PAGE_SIZE_LIMIT
     result = scroll_query(query.index, query.raw_query)
     return ScanResult(result.count, (ESQuerySet.normalize_result(query, r)
                                      for r in result))
Пример #6
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     query = deepcopy(self)
     if query._size is None:
         query._size = SCROLL_PAGE_SIZE_LIMIT
     result = scroll_query(query.index, query.raw_query, es_instance_alias=self.es_instance_alias)
     return ScanResult(
         result.count,
         (ESQuerySet.normalize_result(query, r) for r in result)
     )
Пример #7
0
 def scroll(self):
     """
     Run the query against the scroll api. Returns an iterator yielding each
     document that matches the query.
     """
     query = deepcopy(self)
     if query._size is None:
         query._size = SCROLL_PAGE_SIZE_LIMIT
     result = scroll_query(query.index,
                           query.raw_query,
                           es_instance_alias=self.es_instance_alias)
     # scroll doesn't include _id in the source even if it's specified, so include it
     include_id = getattr(query, '_source', None) and "_id" in query._source
     for r in result:
         if include_id:
             r['_source']['_id'] = r.get('_id', None)
         yield ESQuerySet.normalize_result(query, r)