Mercurial Hosting > luan
diff lucene/src/luan/modules/lucene/Web_search.luan @ 539:473e456444ff
Remove object-oriented primitive methods for string and binary
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 01 Jun 2015 17:53:55 -0600 |
parents | 5fed3de0aac7 |
children | 4362eb720da9 |
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Web_search.luan Mon Jun 01 00:51:44 2015 -0600 +++ b/lucene/src/luan/modules/lucene/Web_search.luan Mon Jun 01 17:53:55 2015 -0600 @@ -10,6 +10,7 @@ local Io = require "luan:Io" local Http = require "luan:http/Http" local String = require "luan:String" +local string_to_number = String.string_to_number local Html = require "luan:Html" local M = {} @@ -140,7 +141,7 @@ assert_double=assert_double; } local query = load(query_string,"<query>",query_env,true)() - local rows = Http.request.parameter.rows.to_number() + local rows = string_to_number(Http.request.parameter.rows) local sort = load(Http.request.parameter.sort,"<sort>",{sort=index.query.sort},true)() index.Searcher( function(searcher) local results, length, total_hits = searcher.search(query,rows,sort)