You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/12/08 13:02:47 UTC

incubator-ponymail git commit: Bug #254 - attempt to get length of field 'body' (a userdata value)

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master c4045ee35 -> 8a9f98c66


Bug #254 - attempt to get length of field 'body' (a userdata value)

The commit f6fe023 was incomplete; the sid changes with each scroll call
So propagate the setting

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/8a9f98c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/8a9f98c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/8a9f98c6

Branch: refs/heads/master
Commit: 8a9f98c66c8532a331f9d9728f46b68cd87126fa
Parents: c4045ee
Author: Sebb <se...@apache.org>
Authored: Thu Dec 8 13:02:36 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Thu Dec 8 13:02:36 2016 +0000

----------------------------------------------------------------------
 site/api/lib/elastic.lua | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/8a9f98c6/site/api/lib/elastic.lua
----------------------------------------------------------------------
diff --git a/site/api/lib/elastic.lua b/site/api/lib/elastic.lua
index 313fe97..a3154f2 100644
--- a/site/api/lib/elastic.lua
+++ b/site/api/lib/elastic.lua
@@ -191,6 +191,9 @@ function scroll(sid)
     local json = performRequest(url)
     if json and json._scroll_id then
         if scanHasBody[sid] then
+            -- propagate the setting for the next call
+            scanHasBody[json._scroll_id] = true
+            scanHasBody[sid] = nil -- no longer needed
             local dhh = json.hits.hits
             for k = 1, #dhh do
                 local v = dhh[k]._source