Mercurial Hosting > luan
comparison src/luan/modules/lucene/Lucene.luan @ 1398:67c0e47b5be3
more lucene
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 11 Sep 2019 15:48:49 -0600 |
parents | 0dc9837c16be |
children | 27efb1fcbcb5 |
comparison
equal
deleted
inserted
replaced
1397:0dc9837c16be | 1398:67c0e47b5be3 |
---|---|
68 index.ensure_open = java_index.ensure_open | 68 index.ensure_open = java_index.ensure_open |
69 index.next_id = java_index.nextId | 69 index.next_id = java_index.nextId |
70 index.highlighter = java_index.highlighter | 70 index.highlighter = java_index.highlighter |
71 index.indexed_only_fields = java_index.indexed_only_fields | 71 index.indexed_only_fields = java_index.indexed_only_fields |
72 index.count_tokens = java_index.count_tokens | 72 index.count_tokens = java_index.count_tokens |
73 index.close = java_index.close | 73 --index.close = java_index.close |
74 | 74 |
75 index.has_postgres_backup = java_index.hasPostgresBackup() | 75 index.has_postgres_backup = java_index.hasPostgresBackup() |
76 function index.rebuild_postgres_backup() | 76 function index.rebuild_postgres_backup() |
77 java_index.rebuild_postgres_backup(index.completer) | 77 java_index.rebuild_postgres_backup(index.completer) |
78 end | 78 end |
184 function index.restore(zip_file) | 184 function index.restore(zip_file) |
185 java_index.run_in_lock( function() | 185 java_index.run_in_lock( function() |
186 local lucene_dir = index.dir | 186 local lucene_dir = index.dir |
187 local before_restore = lucene_dir.parent().child("before_restore.zip") | 187 local before_restore = lucene_dir.parent().child("before_restore.zip") |
188 index.zip(before_restore) | 188 index.zip(before_restore) |
189 java_index.doClose() | 189 java_index.close() |
190 lucene_dir.delete() | 190 lucene_dir.delete() |
191 Io.uri("os:unzip "..zip_file.canonical().to_string(),{dir=lucene_dir.parent()}).read_text() | 191 Io.uri("os:unzip "..zip_file.canonical().to_string(),{dir=lucene_dir.parent()}).read_text() |
192 java_index.reopen() | 192 java_index.reopen() |
193 end ) | 193 end ) |
194 end | 194 end |