Mercurial Hosting > luan
view examples/blog/src/lib/Db.luan @ 1383:a3d0d1c2ce89
add NotFound to luanhost
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 01 Aug 2019 16:49:47 -0600 |
parents | 709f7498a363 |
children | bc40bc9aab3a |
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) 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