community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1852854 - /comdev/helpwanted.apache.org/site/admin/elastic.lua
Date Sun, 03 Feb 2019 21:31:51 GMT
Author: sebb
Date: Sun Feb  3 21:31:51 2019
New Revision: 1852854

URL: http://svn.apache.org/viewvc?rev=1852854&view=rev
Log:
Sync changes from other copy

Modified:
    comdev/helpwanted.apache.org/site/admin/elastic.lua

Modified: comdev/helpwanted.apache.org/site/admin/elastic.lua
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/admin/elastic.lua?rev=1852854&r1=1852853&r2=1852854&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/admin/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/admin/elastic.lua Sun Feb  3 21:31:51 2019
@@ -33,7 +33,6 @@ local function getHits(query, size, doc,
     query = query:gsub(" ", "+")
     local url = config.es_url .. doc .. "/_search?q="..query.."&sort=" .. sitem .. ":desc&size="
.. size
     local result = http.request(url)
-    local out = {}
     local json = JSON.decode(result)
     local out = {}
     if json and json.hits and json.hits.hits then
@@ -49,7 +48,6 @@ end
 local function getDoc (ty, id)
     local url = config.es_url  .. ty .. "/" .. id
     local result = http.request(url)
-    local out = {}
     local json = JSON.decode(result)
     if json and json._source then
         json._source.request_id = json._id
@@ -65,7 +63,6 @@ local function getHeaders(query, size, d
     query = query:gsub(" ", "+")
     local url = config.es_url  .. doc .. "/_search?_source_exclude=body&q="..query.."&sort=date:desc&size="
.. size
     local result = http.request(url)
-    local out = {}
     local json = JSON.decode(result)
     local out = {}
     if json and json.hits and json.hits.hits then
@@ -84,7 +81,6 @@ local function getHeadersReverse(query,
     query = query:gsub(" ", "+")
     local url = config.es_url .. doc .. "/_search?_source_exclude=body&q="..query.."&sort=epoch:desc&size="
.. size
     local result = http.request(url)
-    local out = {}
     local json = JSON.decode(result)
     local out = {}
     if json and json.hits and json.hits.hits then
@@ -102,7 +98,6 @@ local function raw(query, doctype)
     doctype = doctype or default_doc
     local url = config.es_url .. doctype .. "/_search"
     local result = http.request(url, js)
-    local out = {}
     local json = JSON.decode(result)
     return json or {}, url
 end
@@ -113,7 +108,6 @@ local function update(doctype, id, query
     doctype = doctype or default_doc
     local url = config.es_url .. doctype .. "/" .. id .. "/_update"
     local result = http.request(url, js)
-    local out = {}
     local json = JSON.decode(result)
     return json or {}, url
 end
@@ -126,7 +120,6 @@ local function index(r, id, ty, body)
     end
     local url = config.es_url .. ty .. "/" .. id
     local result = http.request(url, body)
-    local out = {}
     local json = JSON.decode(result)
     return json or {}
 end



Mime
View raw message