You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2019/02/03 23:43:57 UTC
svn commit: r1852863 - in /comdev/helpwanted.apache.org/site:
admin/elastic.lua lib/elastic.lua
Author: sebb
Date: Sun Feb 3 23:43:57 2019
New Revision: 1852863
URL: http://svn.apache.org/viewvc?rev=1852863&view=rev
Log:
Use same internal name
Modified:
comdev/helpwanted.apache.org/site/admin/elastic.lua
comdev/helpwanted.apache.org/site/lib/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=1852863&r1=1852862&r2=1852863&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/admin/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/admin/elastic.lua Sun Feb 3 23:43:57 2019
@@ -26,7 +26,7 @@ local config = {
local default_doc = "item"
-- Standard ES query, returns $size results of any doc of type $doc, sorting by $sitem (desc)
-local function getHits(query, size, doc, sitem)
+local function find(query, size, doc, sitem)
doc = doc or default_doc
sitem = sitem or "epoch"
size = size or 10
@@ -45,7 +45,7 @@ local function getHits(query, size, doc,
end
-- Get a single document
-local function getDoc (ty, id)
+local function get (ty, id)
local url = config.es_url .. ty .. "/" .. id
local result = http.request(url)
local json = JSON.decode(result)
@@ -91,8 +91,8 @@ end
-- module defs
return {
- find = getHits,
- get = getDoc,
+ find = find,
+ get = get,
raw = raw,
index = index,
update = update
Modified: comdev/helpwanted.apache.org/site/lib/elastic.lua
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/lib/elastic.lua?rev=1852863&r1=1852862&r2=1852863&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/lib/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/lib/elastic.lua Sun Feb 3 23:43:57 2019
@@ -26,7 +26,7 @@ local config = {
local default_doc = "item"
-- Standard ES query, returns $size results of any doc of type $doc, sorting by $sitem (desc)
-local function getHits(query, size, doc, sitem)
+local function find(query, size, doc, sitem)
doc = doc or default_doc
sitem = sitem or "epoch"
size = size or 10
@@ -45,7 +45,7 @@ local function getHits(query, size, doc,
end
-- Get a single document
-local function getDoc (ty, id)
+local function get (ty, id)
local url = config.es_url .. ty .. "/" .. id
local result = http.request(url)
local json = JSON.decode(result)
@@ -91,8 +91,8 @@ end
-- module defs
return {
- find = getHits,
- get = getDoc,
+ find = find,
+ get = get,
raw = raw,
index = index,
update = update