changeset 1417:c7f9dd062eda

lucene cleanup
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 18 Oct 2019 19:38:08 -0600
parents db57d562c4bd
children 732b5de211fc
files src/luan/modules/lucene/Lucene.luan
diffstat 1 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/lucene/Lucene.luan	Fri Oct 18 15:06:32 2019 -0600
+++ b/src/luan/modules/lucene/Lucene.luan	Fri Oct 18 19:38:08 2019 -0600
@@ -10,10 +10,6 @@
 local uri = Io.uri or error()
 local String = require "luan:String.luan"
 local matches = String.matches or error()
-local Thread = require "luan:Thread.luan"
-local schedule = Thread.schedule or error()
-local run_in_lock = Thread.run_in_lock or error()
-local Time = require "luan:Time.luan"
 local Rpc = require "luan:Rpc.luan"
 local LuceneIndex = require "java:luan.modules.lucene.LuceneIndex"
 local NumberFieldParser = require "java:goodjava.queryparser.NumberFieldParser"
@@ -34,8 +30,6 @@
 
 Lucene.literal = SaneQueryParser.literal
 
--- function Lucene.index(index_dir,default_type,default_fields)
-
 function Lucene.index(index_dir,options)
 	type(index_dir)=="table" or error "index_dir must be table"
 	index_dir.to_uri_string and matches(index_dir.to_uri_string(),"^file:") or error "must be file"
@@ -137,19 +131,6 @@
 		end
 	end
 
-	function index.backup_to(backup_dir)
-		backup_dir.delete()
-		backup_dir.mkdir()
-		index.snapshot( function(dir_path,file_names)
-			local lucene_dir = uri("file:"..dir_path)
-			for _, file_name in ipairs(file_names) do
-				local lucene_file = lucene_dir.child(file_name)
-				local backup_file = backup_dir.child(file_name)
-				backup_file.link_to(lucene_file)
-			end
-		end )
-	end
-
 	function index.zip(zip_file)
 		index.snapshot( function(dir_path,file_names)
 			zip_file.delete()