Mercurial Hosting > luan
comparison lucene/src/luan/modules/lucene/Lucene.luan @ 748:de2418d11786
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 14 Jul 2016 21:09:55 -0600 |
parents | 293c397e8dee |
children | 85f5444fb7d4 |
comparison
equal
deleted
inserted
replaced
747:d3a1e9a48a94 | 748:de2418d11786 |
---|---|
6 local Html = require "luan:Html.luan" | 6 local Html = require "luan:Html.luan" |
7 local Io = require "luan:Io.luan" | 7 local Io = require "luan:Io.luan" |
8 local uri = Io.uri or error() | 8 local uri = Io.uri or error() |
9 local String = require "luan:String.luan" | 9 local String = require "luan:String.luan" |
10 local matches = String.matches or error() | 10 local matches = String.matches or error() |
11 local Table = require "luan:Table.luan" | |
12 local LuceneIndex = require "java:luan.modules.lucene.LuceneIndex" | 11 local LuceneIndex = require "java:luan.modules.lucene.LuceneIndex" |
13 local NumberFieldParser = require "java:luan.modules.lucene.queryparser.NumberFieldParser" | 12 local NumberFieldParser = require "java:luan.modules.lucene.queryparser.NumberFieldParser" |
14 local StringFieldParser = require "java:luan.modules.lucene.queryparser.StringFieldParser" | 13 local StringFieldParser = require "java:luan.modules.lucene.queryparser.StringFieldParser" |
15 local SaneQueryParser = require "java:luan.modules.lucene.queryparser.SaneQueryParser" | 14 local SaneQueryParser = require "java:luan.modules.lucene.queryparser.SaneQueryParser" |
16 local Version = require "java:org.apache.lucene.util.Version" | 15 local Version = require "java:org.apache.lucene.util.Version" |
108 local t = {} | 107 local t = {} |
109 for _, file_name in ipairs(file_names) do | 108 for _, file_name in ipairs(file_names) do |
110 t[#t+1] = dir.."/"..file_name | 109 t[#t+1] = dir.."/"..file_name |
111 end | 110 end |
112 local base = uri("file:"..dir).parent().to_string() | 111 local base = uri("file:"..dir).parent().to_string() |
113 uri(zip_file).zip(base,Table.unpack(t)) | 112 uri(zip_file).zip(base,t) |
114 end ) | 113 end ) |
115 end | 114 end |
116 | 115 |
117 return index | 116 return index |
118 end | 117 end |