Mercurial Hosting > luan
diff src/luan/modules/lucene/Lucene.luan @ 1528:3bd4d7963456
use goodjava/lucene/api
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 26 Jul 2020 23:11:53 -0600 |
parents | fa1e3adbebfb |
children | fa39e3c356ae |
line wrap: on
line diff
--- a/src/luan/modules/lucene/Lucene.luan Sun Jul 26 15:06:15 2020 -0600 +++ b/src/luan/modules/lucene/Lucene.luan Sun Jul 26 23:11:53 2020 -0600 @@ -40,9 +40,7 @@ options = options or {} local index = {} index.dir = index_dir - index.completer = options.completer - options.completer = nil - options.supplementer = nil + options.completer = nil -- remove local java_index = LuceneIndex.getLuceneIndex(index_dir.java.file,options) index.java = java_index @@ -62,28 +60,19 @@ index.search_in_transaction = java_index.search_in_transaction index.delete_all = java_index.delete_all index.delete = java_index.delete - --index.save = java_index.save + index.save = java_index.save index.run_in_transaction = java_index.run_in_transaction 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 + function index.indexed_only_fields(fields) end -- remove index.count_tokens = java_index.count_tokens --index.close = java_index.close - local java_save = java_index.save - function index.save(doc,boosts) - java_save(index.completer,doc,boosts) - end - index.has_postgres_backup = java_index.hasPostgresBackup() index.rebuild_postgres_backup = java_index.rebuild_postgres_backup - function index.restore_from_postgres() - java_index.restore_from_postgres(index.completer) - end - function index.force_restore_from_postgres() - java_index.force_restore_from_postgres(index.completer) - end + index.restore_from_postgres = java_index.restore_from_postgres + index.force_restore_from_postgres = java_index.force_restore_from_postgres index.check = java_index.check function index.search( query, from, to, options )