def next_segments(max_segments = nil)
      max_segments = Elasticrawl::MAX_SEGMENTS if max_segments.nil?
      max_segments = Elasticrawl::MAX_SEGMENTS if max_segments > Elasticrawl::MAX_SEGMENTS

      self.crawl_segments.where(:parse_time => nil).limit(max_segments)
    end
def next_segments(max_segments = nil)
      max_segments = Elasticrawl::MAX_SEGMENTS if max_segments.nil?
      max_segments = Elasticrawl::MAX_SEGMENTS if max_segments > Elasticrawl::MAX_SEGMENTS

      self.crawl_segments.where(:parse_time => nil).limit(max_segments)
    end
Returns next # segments to be parsed. The maximum is 256
 as this is the maximum # of steps for an Elastic MapReduce job flow.