Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9E250200BE7 for ; Tue, 6 Dec 2016 03:05:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9CABC160B21; Tue, 6 Dec 2016 02:05:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BFEB5160B18 for ; Tue, 6 Dec 2016 03:05:48 +0100 (CET) Received: (qmail 13853 invoked by uid 500); 6 Dec 2016 02:05:48 -0000 Mailing-List: contact commits-help@ponymail.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ponymail.incubator.apache.org Delivered-To: mailing list commits@ponymail.incubator.apache.org Received: (qmail 13841 invoked by uid 99); 6 Dec 2016 02:05:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2016 02:05:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7DE4BD17FB for ; Tue, 6 Dec 2016 02:05:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id x8gatg0dDNM1 for ; Tue, 6 Dec 2016 02:05:46 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id A761F5F2EF for ; Tue, 6 Dec 2016 02:05:45 +0000 (UTC) Received: (qmail 13825 invoked by uid 99); 6 Dec 2016 02:05:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2016 02:05:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4BC1E0C09; Tue, 6 Dec 2016 02:05:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sebb@apache.org To: commits@ponymail.incubator.apache.org Message-Id: <508d1783a80f443e86e05e88a5fcccc4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-ponymail git commit: fetch only aggregation results where the hits are not needed Date: Tue, 6 Dec 2016 02:05:44 +0000 (UTC) archived-at: Tue, 06 Dec 2016 02:05:49 -0000 Repository: incubator-ponymail Updated Branches: refs/heads/master ff5ed37e0 -> 98cf3e627 fetch only aggregation results where the hits are not needed This fixes #271 Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/98cf3e62 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/98cf3e62 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/98cf3e62 Branch: refs/heads/master Commit: 98cf3e627f0adb6fbba29c866ca8eabe3875c616 Parents: ff5ed37 Author: Sebb Authored: Tue Dec 6 02:05:28 2016 +0000 Committer: Sebb Committed: Tue Dec 6 02:05:28 2016 +0000 ---------------------------------------------------------------------- site/api/pminfo.lua | 5 ++++- site/api/preferences.lua | 3 +++ site/api/static.lua | 2 ++ site/api/stats.lua | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/98cf3e62/site/api/pminfo.lua ---------------------------------------------------------------------- diff --git a/site/api/pminfo.lua b/site/api/pminfo.lua index 2f27a14..425358e 100644 --- a/site/api/pminfo.lua +++ b/site/api/pminfo.lua @@ -60,6 +60,7 @@ function handle(r) --[[ Get active lists ]]-- local doc = elastic.raw { + size = 0, -- we don't need the hits themselves query = { bool = { @@ -134,8 +135,9 @@ function handle(r) table.insert(t, r:clock() - tnow) tnow = r:clock() - --[[ Get historgram of emails ]] + --[[ Get histogram of emails ]] local doc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { weekly = { date_histogram = { @@ -170,6 +172,7 @@ function handle(r) end local doc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = { http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/98cf3e62/site/api/preferences.lua ---------------------------------------------------------------------- diff --git a/site/api/preferences.lua b/site/api/preferences.lua index f6540e3..d14a9df 100644 --- a/site/api/preferences.lua +++ b/site/api/preferences.lua @@ -217,6 +217,7 @@ Pony Mail - Email for Ponies and People. lists = JSON.decode(cache) else local doc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = { @@ -228,6 +229,7 @@ Pony Mail - Email for Ponies and People. } local ndoc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = { @@ -274,6 +276,7 @@ Pony Mail - Email for Ponies and People. pdoc = JSON.decode(cache) else pdoc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = { http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/98cf3e62/site/api/static.lua ---------------------------------------------------------------------- diff --git a/site/api/static.lua b/site/api/static.lua index b648aed..12316db 100644 --- a/site/api/static.lua +++ b/site/api/static.lua @@ -215,6 +215,7 @@ function handle(r) local dd = 90 local daterange = {gt = "now-"..dd.."d" } local doc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = { @@ -253,6 +254,7 @@ function handle(r) local dd = 90 local daterange = {gt = "now-"..dd.."d" } local doc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = { http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/98cf3e62/site/api/stats.lua ---------------------------------------------------------------------- diff --git a/site/api/stats.lua b/site/api/stats.lua index 854d950..9d2d2cd 100644 --- a/site/api/stats.lua +++ b/site/api/stats.lua @@ -315,6 +315,7 @@ function handle(r) tnow = r:clock() local doc = elastic.raw { + size = 0, -- we don't need the hits themselves aggs = { from = { terms = {