annotate src/lib/Db.luan @ 12:ad1604c72156

fix bbcode
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 03 Jul 2022 22:01:23 -0600
parents de0cbf515ef5
children 0edde02b908c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local Lucene = require "luan:lucene/Lucene.luan"
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 local Io = require "luan:Io.luan"
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 local uri = Io.uri or error()
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 local dir = uri("site:/private/local/lucene")
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 local Db = Lucene.index( dir, {} )
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11
3
Franklin Schmidt <fschmidt@gmail.com>
parents: 2
diff changeset
12 Db.indexed_fields.user_email = Lucene.type.lowercase
Franklin Schmidt <fschmidt@gmail.com>
parents: 2
diff changeset
13 Db.indexed_fields.user_name = Lucene.type.lowercase
Franklin Schmidt <fschmidt@gmail.com>
parents: 2
diff changeset
14
8
be36282b556a add new_thread
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
15 Db.indexed_fields.post_author_name = Lucene.type.string
be36282b556a add new_thread
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
16 Db.indexed_fields.post_is_root = Lucene.type.string
be36282b556a add new_thread
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
17 Db.indexed_fields.post_root_id = Lucene.type.long
be36282b556a add new_thread
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
18
2
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 return Db