Mercurial Hosting > luan
comparison src/luan/modules/lucene/Lucene.luan @ 1548:736ec76bbf42
lucene log work
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 27 Sep 2020 22:07:18 -0600 |
parents | 35601f15ecc3 |
children | 52241b69c339 |
comparison
equal
deleted
inserted
replaced
1547:f24a9ba7551e | 1548:736ec76bbf42 |
---|---|
7 local set_metatable = Luan.set_metatable or error() | 7 local set_metatable = Luan.set_metatable or error() |
8 local Boot = require "luan:Boot.luan" | 8 local Boot = require "luan:Boot.luan" |
9 local Html = require "luan:Html.luan" | 9 local Html = require "luan:Html.luan" |
10 local Number = require "luan:Number.luan" | 10 local Number = require "luan:Number.luan" |
11 local integer = Number.integer or error() | 11 local integer = Number.integer or error() |
12 local Time = require "luan:Time.luan" | |
12 local Io = require "luan:Io.luan" | 13 local Io = require "luan:Io.luan" |
13 local uri = Io.uri or error() | 14 local uri = Io.uri or error() |
14 local String = require "luan:String.luan" | 15 local String = require "luan:String.luan" |
15 local matches = String.matches or error() | 16 local matches = String.matches or error() |
16 local Rpc = require "luan:Rpc.luan" | 17 local Rpc = require "luan:Rpc.luan" |
44 local index = {} | 45 local index = {} |
45 index.dir = index_dir | 46 index.dir = index_dir |
46 index_dir = get_file(index_dir) | 47 index_dir = get_file(index_dir) |
47 options = options or {} | 48 options = options or {} |
48 options.log_dir = options.log_dir and get_file(options.log_dir) | 49 options.log_dir = options.log_dir and get_file(options.log_dir) |
50 options.log_time = options.log_time or Time.period{days=30} | |
49 local java_index = LuceneIndex.getLuceneIndex(index_dir,options) | 51 local java_index = LuceneIndex.getLuceneIndex(index_dir,options) |
50 index.java = java_index | 52 index.java = java_index |
51 | 53 |
52 index.indexed_fields = {} | 54 index.indexed_fields = {} |
53 local mt = {} | 55 local mt = {} |