Class: Gifts::TermTable
Instance Method Summary
collapse
Methods inherited from TableBase
#initialize
Instance Method Details
#define_schema ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/gifts/term_table.rb', line 7
def define_schema
Groonga::Schema.define do |schema|
schema.create_table(
"term",
type: :patricia_trie,
normalizer: :NormalizerAuto,
default_tokenizer: "TokenBigram"
) do |table|
table.index("commit.message", with_position: true)
table.index("diff.commit", with_position: true)
table.index("diff.diff", with_position: true)
table.index("file.ext", with_position: true)
table.index("file.path", with_position: true)
table.index("user.name", with_position: true)
end
end
end
|
#table_name ⇒ Object
3
4
5
|
# File 'lib/gifts/term_table.rb', line 3
def table_name
"term"
end
|