-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-search.php
53 lines (48 loc) · 1.34 KB
/
init-search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
include(__DIR__ . '/LYLib.php');
include(__DIR__ . '/config.php');
try {
LYLib::dropIndex('meet');
LYLib::dropIndex('person');
LYLib::dropIndex('speech');
LYLib::dropIndex('vote');
} catch (Exception $e) {
}
LYLib::createIndex('meet', [
"date_detection" => false,
'properties' => [
'term' => ['type' => 'integer'],
'sessionPeriod' => ['type' => 'integer'],
'date' => ['type' => 'integer'],
'title' => ['type' => 'text'],
],
]);
LYLib::createIndex('person', [
"date_detection" => false,
'properties' => [
'term' => ['type' => 'integer'],
'type' => ['type' => 'integer'],
],
]);
LYLib::createIndex('speech', [
"date_detection" => false,
'properties' => [
'term' => ['type' => 'integer'],
'meet_id' => ['type' => 'keyword'],
'lineno' => ['type' => 'integer'],
'speaker' => ['type' => 'keyword'],
'content' => ['type' => 'text'],
],
]);
LYLib::createIndex('vote', [
"date_detection" => false,
'properties' => [
'term' => ['type' => 'integer'],
'meet_id' => ['type' => 'keyword'],
'line_no' => ['type' => 'integer'],
'贊成' => ['type' => 'keyword'],
'反對' => ['type' => 'keyword'],
'棄權' => ['type' => 'keyword'],
'date' => ['type' => 'integer'],
],
]);