Mercurial Hosting > luan
comparison lucene/src/luan/modules/lucene/Web_search.luan @ 505:7bc63886d4f2
web page modules now return a function
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 May 2015 01:45:49 -0600 |
parents | 92c3d22745b8 |
children | 1b2e4c7dab85 |
comparison
equal
deleted
inserted
replaced
504:dbdf4b8193a8 | 505:7bc63886d4f2 |
---|---|
120 end | 120 end |
121 | 121 |
122 | 122 |
123 function M.of(index) | 123 function M.of(index) |
124 | 124 |
125 return { respond = function() | 125 return function() |
126 Io.stdout = Http.response.text_writer() | 126 Io.stdout = Http.response.text_writer() |
127 local query_string = Http.request.parameter.query | 127 local query_string = Http.request.parameter.query |
128 if query_string == nil then | 128 if query_string == nil then |
129 form() | 129 form() |
130 return | 130 return |
143 end | 143 end |
144 table[#table+1] = row | 144 table[#table+1] = row |
145 end | 145 end |
146 result(query,sort,headers,table) | 146 result(query,sort,headers,table) |
147 end ) | 147 end ) |
148 end } | 148 end |
149 | 149 |
150 end | 150 end |
151 | 151 |
152 return M | 152 return M |