Mercurial Hosting > luan
view examples/blog/src/lib/Db.luan @ 1311:ca742d51b31f
don't delete into symbolic links
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 24 Jan 2019 21:15:03 -0700 |
parents | 4416b9cbebf9 |
children | 709f7498a363 |
line wrap: on
line source
local Lucene = require "luan:lucene/Lucene.luan" local Io = require "luan:Io.luan" local Db = {} function Db.new(lucene_dir) local dir = Io.uri(lucene_dir).to_string() local db = Lucene.index( dir, Lucene.type.english, {"subject","content"} ) -- this is how you index a field -- db.indexed_fields.post_date = Lucene.type.long return db end Db.db = Db.new("site:/private/local/lucene") return Db