community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1852861 - in /comdev/helpwanted.apache.org/site: admin/elastic.lua lib/elastic.lua
Date Sun, 03 Feb 2019 23:41:15 GMT
Author: sebb
Date: Sun Feb  3 23:41:15 2019
New Revision: 1852861

URL: http://svn.apache.org/viewvc?rev=1852861&view=rev
Log:
Simplify

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=1852861&r1=1852860&r2=1852861&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/admin/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/admin/elastic.lua Sun Feb  3 23:41:15 2019
@@ -51,8 +51,10 @@ local function getDoc (ty, id)
     local json = JSON.decode(result)
     if json and json._source then
         json._source.request_id = json._id
+        return json._source
+    else
+        return {}
     end
-    return (json and json._source) and json._source or {}
 end
 
 -- Do a raw ES query with a JSON query

Modified: comdev/helpwanted.apache.org/site/lib/elastic.lua
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/lib/elastic.lua?rev=1852861&r1=1852860&r2=1852861&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/lib/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/lib/elastic.lua Sun Feb  3 23:41:15 2019
@@ -51,8 +51,10 @@ local function getDoc (ty, id)
     local json = JSON.decode(result)
     if json and json._source then
         json._source.request_id = json._id
+        return json._source
+    else
+        return {}
     end
-    return (json and json._source) and json._source or {}
 end
 
 -- Do a raw ES query with a JSON query



Mime
View raw message