# Spark Reading From Elastic gives count less then actual

**URL:** <https://discuss.elastic.co/t/spark-reading-from-elastic-gives-count-less-then-actual/85268>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [May 10, 2017, 2:43pm UTC](https://discuss.elastic.co/t/spark-reading-from-elastic-gives-count-less-then-actual/85268 "2017-05-10T14:43:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramvodedara](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@ramvodedara](https://discuss.elastic.co/u/ramvodedara)\
**Post date:** [May 10, 2017, 2:43pm UTC](https://discuss.elastic.co/t/spark-reading-from-elastic-gives-count-less-then-actual/85268/1 "2017-05-10T14:43:29Z")

</div>

Spark-scala Reading From elasticSearch Version 5.1 and creates dataframe  
I am using cache for cache whole dataframe  
Spark version "2.1"  
Elastic dependency "elasticsearch-spark-20\_2.11" "5.1.2"

Most of the time count is less or more

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 7, 2017, 2:53pm UTC](https://discuss.elastic.co/t/spark-reading-from-elastic-gives-count-less-then-actual/85268/2 "2017-06-07T14:53:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
