Mercurial Hosting > luan
comparison examples/blog/src/lib/Db.luan @ 1576:13135e289b50
domain change
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 28 Jan 2021 20:47:39 -0700 |
parents | 82415c9c0015 |
children | 8dd8c556c449 |
comparison
equal
deleted
inserted
replaced
1575:0160650180bc | 1576:13135e289b50 |
---|---|
11 | 11 |
12 | 12 |
13 local postgres_spec = Hosted.postgres_spec() | 13 local postgres_spec = Hosted.postgres_spec() |
14 --logger.info(stringify(postgres_spec)) | 14 --logger.info(stringify(postgres_spec)) |
15 | 15 |
16 local function completer(doc) | |
17 return doc | |
18 end | |
19 | |
20 local dir = Io.uri("site:/private/local/lucene") | 16 local dir = Io.uri("site:/private/local/lucene") |
21 local Db = Lucene.index( dir, { | 17 local Db = Lucene.index( dir, { |
22 default_type = Lucene.type.english | 18 default_type = Lucene.type.english |
23 default_fields = {"subject","content"} | 19 default_fields = {"subject","content"} |
24 completer = completer | |
25 postgres_spec = postgres_spec | 20 postgres_spec = postgres_spec |
26 } ) | 21 } ) |
27 | 22 |
28 -- this is how you index a field | 23 -- this is how you index a field |
29 -- db.indexed_fields.post_date = Lucene.type.long | 24 -- db.indexed_fields.post_date = Lucene.type.long |