title: ElasticSearch, size parameter doesn't work for helpers.scan function
body: <p>I use following python code to fetch the ElasticSearch record. I just want to get 50000 records. but the truth is that I get the whole index(more than 1 million records). </p>
  
  <pre><code>result = helpers.scan(
      es, 
      query={
          "_source": ["points.style_attrs.POI_TYPE", "point.poi_id.encrypted_value"],
          "size": 50000,
          "query": {
              "bool": {
                  "must": [
                      {"term": {"metadata.tag": tag}},
                      {"term": {"metadata.city": city}}
                  ]   
              }   
          }   
      },  
      size=1000,
      index=from_index)
  </code></pre>
  
  <p>When I debug the code, I just want to fetch some records to make sure my code is correct. If I fetch the whole index, I can't debug code quickly.</p>