comparison examples/blog/src/lib/Db.luan @ 1369:709f7498a363

change Lucene.index() and add Lucene.recover()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 19 Jun 2019 00:26:10 -0600
parents 4416b9cbebf9
children bc40bc9aab3a
comparison
equal deleted inserted replaced
1368:5225cd6ed478 1369:709f7498a363
3 3
4 4
5 local Db = {} 5 local Db = {}
6 6
7 function Db.new(lucene_dir) 7 function Db.new(lucene_dir)
8 local dir = Io.uri(lucene_dir).to_string() 8 local dir = Io.uri(lucene_dir)
9 local db = Lucene.index( dir, Lucene.type.english, {"subject","content"} ) 9 local db = Lucene.index( dir, Lucene.type.english, {"subject","content"} )
10 10
11 -- this is how you index a field 11 -- this is how you index a field
12 -- db.indexed_fields.post_date = Lucene.type.long 12 -- db.indexed_fields.post_date = Lucene.type.long
13 13