[PIO-102] Fix ES5 scroll order Closes #406
Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/5813b80d Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/5813b80d Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/5813b80d Branch: refs/heads/livedoc Commit: 5813b80dc79c7a727bbcc73329135c385b71900d Parents: a813021 Author: Mars Hall <[email protected]> Authored: Fri Jul 28 11:52:16 2017 -0700 Committer: Donald Szeto <[email protected]> Committed: Fri Jul 28 11:52:16 2017 -0700 ---------------------------------------------------------------------- .../apache/predictionio/data/storage/elasticsearch/ESUtils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/5813b80d/storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESUtils.scala ---------------------------------------------------------------------- diff --git a/storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESUtils.scala b/storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESUtils.scala index 2bf18ef..3f7b058 100644 --- a/storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESUtils.scala +++ b/storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESUtils.scala @@ -150,7 +150,7 @@ object ESUtils { val responseJValue = parse(EntityUtils.toString(response.getEntity)) scroll((responseJValue \ "_scroll_id").extract[String], (responseJValue \ "hits" \ "hits").extract[Seq[JValue]], - hits.map(h => (h \ "_source").extract[JValue]) ++ results) + results ++ hits.map(h => (h \ "_source").extract[JValue])) } }
