diff src/luan/modules/lucene/Lucene.luan @ 1375:5c3702f60200

cleanup
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 11 Jul 2019 23:19:11 -0600
parents 709f7498a363
children 4c9691d6288f
line wrap: on
line diff
--- a/src/luan/modules/lucene/Lucene.luan	Sun Jul 07 22:49:36 2019 -0600
+++ b/src/luan/modules/lucene/Lucene.luan	Thu Jul 11 23:19:11 2019 -0600
@@ -24,8 +24,6 @@
 
 local Lucene = {}
 
-Lucene.instances = {}
-
 Lucene.type = {
 	english = LuceneIndex.ENGLISH_FIELD_PARSER
 	string = LuceneIndex.STRING_FIELD_PARSER
@@ -63,19 +61,12 @@
 	index.delete = java_index.delete
 	index.save = java_index.save
 	index.update_in_transaction = java_index.update_in_transaction
---	index.close = java_index.close
 	index.ensure_open = java_index.ensure_open
 	index.next_id = java_index.nextId
 	index.highlighter = java_index.highlighter
 	index.indexed_only_fields = java_index.indexed_only_fields
 	index.count_tokens = java_index.count_tokens
-
-	Lucene.instances[index] = true
-
-	function index.close()
-		Lucene.instances[index] = nil
-		closer.close()
-	end
+	index.close = closer.close
 
 	function index.search( query, from, to, options )
 		from or error "missing 'from' parameter"