Mercurial Hosting > luan
annotate blog/src/lib/Db_mod.luan @ 678:49f3d290bebd
add luan_to_java
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 13 Apr 2016 16:24:48 -0600 |
parents | 50540f0813e2 |
children | ca169567ce07 |
rev | line source |
---|---|
596 | 1 local Lucene = require "luan:lucene/Lucene" |
2 local Io = require "luan:Io" | |
3 | |
4 | |
5 local M = {} | |
6 | |
7 M.lucene_dir = "site:/private/local/lucene" | |
8 | |
9 function M.new_db() | |
10 local dir = Io.uri(M.lucene_dir).to_string() | |
599
50540f0813e2
support default search fields in lucene;
Franklin Schmidt <fschmidt@gmail.com>
parents:
596
diff
changeset
|
11 local db = Lucene.index( dir, Lucene.type.english, {"subject","content"} ) |
596 | 12 |
13 -- this is how you index a field | |
14 -- db.indexed_fields.post_date = Lucene.type.long | |
15 | |
16 return db | |
17 end | |
18 | |
19 return M |