community-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1852837&view=rev
Log:
Always use default_doc

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=1852837&r1=1852836&r2=1852837&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/admin/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/admin/elastic.lua Sun Feb  3 14:52:17 2019
@@ -27,7 +27,7 @@ local default_doc = "item"
 
 -- Standard ES query, returns $size results of any doc of type $doc, sorting by $sitem
 function getHits(query, size, doc, sitem)
-    doc = doc or "mbox"
+    doc = doc or default_doc
     sitem = sitem or "epoch"
     size = size or 10
     query = query:gsub(" ", "+")
@@ -60,7 +60,7 @@ end
 -- Get results (a'la getHits), but only return email headers, not the body
 -- provides faster transport when we don't need everything
 function getHeaders(query, size, doc)
-    doc = doc or "mbox"
+    doc = doc or default_doc
     size = size or 10
     query = query:gsub(" ", "+")
     local url = config.es_url  .. doc .. "/_search?_source_exclude=body&q="..query.."&sort=date:desc&size="
.. size
@@ -79,7 +79,7 @@ end
 
 -- Same as above, but reverse return order
 function getHeadersReverse(query, size, doc)
-    doc = doc or "mbox"
+    doc = doc or default_doc
     size = size or 10
     query = query:gsub(" ", "+")
     local url = config.es_url .. doc .. "/_search?_source_exclude=body&q="..query.."&sort=epoch:desc&size="
.. size

Modified: comdev/helpwanted.apache.org/site/lib/elastic.lua
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/lib/elastic.lua?rev=1852837&r1=1852836&r2=1852837&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/lib/elastic.lua (original)
+++ comdev/helpwanted.apache.org/site/lib/elastic.lua Sun Feb  3 14:52:17 2019
@@ -27,7 +27,7 @@ local default_doc = "item"
 
 -- Standard ES query, returns $size results of any doc of type $doc, sorting by $sitem
 function getHits(query, size, doc, sitem)
-    doc = doc or "mbox"
+    doc = doc or default_doc
     sitem = sitem or "epoch"
     size = size or 10
     query = query:gsub(" ", "+")
@@ -60,7 +60,7 @@ end
 -- Get results (a'la getHits), but only return email headers, not the body
 -- provides faster transport when we don't need everything
 function getHeaders(query, size, doc)
-    doc = doc or "mbox"
+    doc = doc or default_doc
     size = size or 10
     query = query:gsub(" ", "+")
     local url = config.es_url  .. doc .. "/_search?_source_exclude=body&q="..query.."&sort=date:desc&size="
.. size
@@ -79,7 +79,7 @@ end
 
 -- Same as above, but reverse return order
 function getHeadersReverse(query, size, doc)
-    doc = doc or "mbox"
+    doc = doc or default_doc
     size = size or 10
     query = query:gsub(" ", "+")
     local url = config.es_url .. doc .. "/_search?_source_exclude=body&q="..query.."&sort=epoch:desc&size="
.. size



Mime
View raw message