diff src/luan/modules/lucene/Lucene.luan @ 1685:46cf5137cb6b

misc fixes
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 08 Jun 2022 20:13:54 -0600
parents 8dd8c556c449
children f48db13ae2d9
line wrap: on
line diff
--- a/src/luan/modules/lucene/Lucene.luan	Sun Jun 05 18:03:32 2022 -0600
+++ b/src/luan/modules/lucene/Lucene.luan	Wed Jun 08 20:13:54 2022 -0600
@@ -62,13 +62,14 @@
 Lucene.quote = GoodQueryParser.quote
 Lucene.escape = GoodQueryParser.escape
 
-local function get_file(f,name)
-	type(f)=="table" or error(name.." must be table")
-	f.to_uri_string and matches(f.to_uri_string(),"^file:") or error(name.." must be file")
+local function get_file(f)
+	type(f)=="table" or error "index_dir must be table"
+	f.to_uri_string and matches(f.to_uri_string(),"^file:") or error "index_dir must be file"
 	return f.java.file or error()
 end
 
 function Lucene.index(index_dir,options)
+	options = options or {}
 	local index = {}
 	local options_name = options.name
 	index.dir = index_dir