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 2018/10/10 23:18:28 UTC

[incubator-ponymail] branch master updated: Bug: elastic.lua#scroll forces sort to use _doc

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git


The following commit(s) were added to refs/heads/master by this push:
     new 2aac5a3  Bug: elastic.lua#scroll forces sort to use _doc
2aac5a3 is described below

commit 2aac5a333d7afef865317f55a03b0a577289fa92
Author: Sebb <se...@apache.org>
AuthorDate: Thu Oct 11 00:18:26 2018 +0100

    Bug: elastic.lua#scroll forces sort to use _doc
    
    This fixes #478
---
 CHANGELOG.md             | 1 +
 site/api/lib/elastic.lua | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 040af22..7ea7a8d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## Changes in 0.11-SNAPSHOT
+- Bug: elastic.lua#scroll forces sort to use _doc (#478)
 - Bug: cannot download more than 10K mails to a mbox file (#475)
 - Enh: Ensure non-printable chars are not lost in source and mbox output (#476)
 - Enh: display buttons even if no mails are found in a month (#470)
diff --git a/site/api/lib/elastic.lua b/site/api/lib/elastic.lua
index 6588319..4eacf5b 100644
--- a/site/api/lib/elastic.lua
+++ b/site/api/lib/elastic.lua
@@ -212,8 +212,6 @@ local function scroll(sidOrQuery, doctype)
                 hasBody = true
             end
         end
-        -- ensure we sort by _doc
-        query.sort = { '_doc' }
         local url = config.es_url .. doctype .. "/_search?scroll=1m"
         -- start off the scroll
         json = performRequest(url, query)