diff lucene/src/luan/modules/lucene/Lucene.luan @ 503:92c3d22745b8

make _ENV optional
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 20 May 2015 23:24:46 -0600
parents 5b36f663a1b8
children 1b2e4c7dab85
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Lucene.luan	Tue May 19 17:57:20 2015 -0600
+++ b/lucene/src/luan/modules/lucene/Lucene.luan	Wed May 20 23:24:46 2015 -0600
@@ -1,7 +1,9 @@
 java()
 local Luan = require "luan:Luan"
 local pairs = Luan.pairs
+local ipairs = Luan.ipairs
 local type = Luan.type
+local error = Luan.error
 local Table = require "luan:Table"
 local LuceneIndex = require "java:luan.modules.lucene.LuceneIndex"
 local Term = require "java:org.apache.lucene.index.Term"
@@ -12,8 +14,9 @@
 local Sort = require "java:org.apache.lucene.search.Sort"
 local SortField = require "java:org.apache.lucene.search.SortField"
 
+local M = {}
 
-function index(indexDir)
+function M.index(indexDir)
 	local index = {}
 	local java_index = LuceneIndex.new(indexDir)
 	index.fields = java_index.fields.newTable()
@@ -127,3 +130,5 @@
 
 	return index
 end
+
+return M