Mercurial Hosting > luan
comparison examples/blog/src/lib/Db.luan @ 1710:fc224a1bb6ea
add blog/serve_and_backup.luan
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 10 Jul 2022 17:52:19 -0600 |
| parents | 2958cf04d844 |
| children | 9e0cf623ecc5 |
comparison
equal
deleted
inserted
replaced
| 1709:6378d261136e | 1710:fc224a1bb6ea |
|---|---|
| 8 local Thread = require "luan:Thread.luan" | 8 local Thread = require "luan:Thread.luan" |
| 9 local Hosted = require "luan:host/Hosted.luan" | 9 local Hosted = require "luan:host/Hosted.luan" |
| 10 local Logging = require "luan:logging/Logging.luan" | 10 local Logging = require "luan:logging/Logging.luan" |
| 11 local logger = Logging.logger "Db" | 11 local logger = Logging.logger "Db" |
| 12 | 12 |
| 13 | |
| 14 if not Hosted.is_hosted then | |
| 15 require "java" | |
| 16 local BackupIndexWriter = require "java:goodjava.lucene.backup.BackupIndexWriter" | |
| 17 BackupIndexWriter.backupDomains = {"localhost"} | |
| 18 end | |
| 19 | 13 |
| 20 local dir = uri("site:/private/local/lucene") | 14 local dir = uri("site:/private/local/lucene") |
| 21 local Db = Lucene.index( dir, { | 15 local Db = Lucene.index( dir, { |
| 22 default_type = Lucene.type.english | 16 default_type = Lucene.type.english |
| 23 default_fields = {"subject","content"} | 17 default_fields = {"subject","content"} |
