You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by do...@apache.org on 2017/07/28 18:55:21 UTC

incubator-predictionio git commit: [PIO-102] Fix ES5 scroll order

Repository: incubator-predictionio
Updated Branches:
  refs/heads/develop a81302171 -> 5813b80dc


[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/develop
Commit: 5813b80dc79c7a727bbcc73329135c385b71900d
Parents: a813021
Author: Mars Hall <ma...@heroku.com>
Authored: Fri Jul 28 11:52:16 2017 -0700
Committer: Donald Szeto <do...@apache.org>
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]))
       }
     }