@@ -3,62 +3,62 @@ module ProtipMapping
3
3
4
4
included do
5
5
settings analysis : {
6
- analyzer : {
7
- comma : { "type" => "pattern" ,
8
- "pattern" => "," ,
9
- "filter" => "keyword"
10
- }
6
+ analyzer : {
7
+ comma : { "type" => "pattern" ,
8
+ "pattern" => "," ,
9
+ "filter" => "keyword"
10
+ }
11
11
12
- }
12
+ }
13
13
}
14
14
15
15
mapping show : { properties : {
16
- public_id : { type : 'string' , index : 'not_analyzed' } ,
17
- kind : { type : 'string' , index : 'not_analyzed' } ,
16
+ public_id : { type : 'string' , index : 'not_analyzed' } ,
17
+ kind : { type : 'string' , index : 'not_analyzed' } ,
18
+ title : { type : 'string' , boost : 100 , analyzer : 'snowball' } ,
19
+ body : { type : 'string' , boost : 80 , analyzer : 'snowball' } ,
20
+ html : { type : 'string' , index : 'not_analyzed' } ,
21
+ tags : { type : 'string' , boost : 80 , analyzer : 'comma' } ,
22
+ upvotes : { type : 'integer' , index : 'not_analyzed' } ,
23
+ url : { type : 'string' , index : 'not_analyzed' } ,
24
+ upvote_path : { type : 'string' , index : 'not_analyzed' } ,
25
+ popular_score : { type : 'double' , index : 'not_analyzed' } ,
26
+ score : { type : 'double' , index : 'not_analyzed' } ,
27
+ trending_score : { type : 'double' , index : 'not_analyzed' } ,
28
+ only_link : { type : 'string' , index : 'not_analyzed' } ,
29
+ link : { type : 'string' , index : 'not_analyzed' } ,
30
+ team : { type : 'multi_field' , index : 'not_analyzed' , fields : {
31
+ name : { type : 'string' , index : 'snowball' } ,
32
+ slug : { type : 'string' , boost : 50 , index : 'snowball' } ,
33
+ avatar : { type : 'string' , index : 'not_analyzed' } ,
34
+ profile_path : { type : 'string' , index : 'not_analyzed' } ,
35
+ hiring : { type : 'boolean' , index : 'not_analyzed' }
36
+ } } ,
37
+ views_count : { type : 'integer' , index : 'not_analyzed' } ,
38
+ comments_count : { type : 'integer' , index : 'not_analyzed' } ,
39
+ best_stat : { type : 'multi_field' , index : 'not_analyzed' , fields : {
40
+ name : { type : 'string' , index : 'not_analyzed' } ,
41
+ value : { type : 'integer' , index : 'not_analyzed' } ,
42
+ } } ,
43
+ comments : { type : 'object' , index : 'not_analyzed' , properties : {
18
44
title : { type : 'string' , boost : 100 , analyzer : 'snowball' } ,
19
45
body : { type : 'string' , boost : 80 , analyzer : 'snowball' } ,
20
- html : { type : 'string' , index : 'not_analyzed' } ,
21
- tags : { type : 'string' , boost : 80 , analyzer : 'comma' } ,
22
- upvotes : { type : 'integer' , index : 'not_analyzed' } ,
23
- url : { type : 'string' , index : 'not_analyzed' } ,
24
- upvote_path : { type : 'string' , index : 'not_analyzed' } ,
25
- popular_score : { type : 'double' , index : 'not_analyzed' } ,
26
- score : { type : 'double' , index : 'not_analyzed' } ,
27
- trending_score : { type : 'double' , index : 'not_analyzed' } ,
28
- only_link : { type : 'string' , index : 'not_analyzed' } ,
29
- link : { type : 'string' , index : 'not_analyzed' } ,
30
- team : { type : 'multi_field' , index : 'not_analyzed' , fields : {
31
- name : { type : 'string' , index : 'snowball' } ,
32
- slug : { type : 'string' , boost : 50 , index : 'snowball' } ,
33
- avatar : { type : 'string' , index : 'not_analyzed' } ,
34
- profile_path : { type : 'string' , index : 'not_analyzed' } ,
35
- hiring : { type : 'boolean' , index : 'not_analyzed' }
36
- } } ,
37
- views_count : { type : 'integer' , index : 'not_analyzed' } ,
38
- comments_count : { type : 'integer' , index : 'not_analyzed' } ,
39
- best_stat : { type : 'multi_field' , index : 'not_analyzed' , fields : {
40
- name : { type : 'string' , index : 'not_analyzed' } ,
41
- value : { type : 'integer' , index : 'not_analyzed' } ,
42
- } } ,
43
- comments : { type : 'object' , index : 'not_analyzed' , properties : {
44
- title : { type : 'string' , boost : 100 , analyzer : 'snowball' } ,
45
- body : { type : 'string' , boost : 80 , analyzer : 'snowball' } ,
46
- likes : { type : 'integer' , index : 'not_analyzed' }
47
- } } ,
48
- networks : { type : 'string' , boost : 50 , analyzer : 'comma' } ,
49
- upvoters : { type : 'integer' , boost : 50 , index : 'not_analyzed' } ,
50
- created_at : { type : 'date' , boost : 10 , index : 'not_analyzed' } ,
51
- featured : { type : 'boolean' , index : 'not_analyzed' } ,
52
- flagged : { type : 'boolean' , index : 'not_analyzed' } ,
53
- created_automagically : { type : 'boolean' , index : 'not_analyzed' } ,
54
- reviewed : { type : 'boolean' , index : 'not_analyzed' } ,
55
- user : { type : 'multi_field' , index : 'not_analyzed' , fields : {
56
- username : { type : 'string' , boost : 40 , index : 'not_analyzed' } ,
57
- name : { type : 'string' , boost : 40 , index : 'not_analyzed' } ,
58
- user_id : { type : 'integer' , boost : 40 , index : 'not_analyzed' } ,
59
- profile_path : { type : 'string' , index : 'not_analyzed' } ,
60
- avatar : { type : 'string' , index : 'not_analyzed' } ,
61
- about : { type : 'string' , index : 'not_analyzed' } ,
62
- } } } }
46
+ likes : { type : 'integer' , index : 'not_analyzed' }
47
+ } } ,
48
+ networks : { type : 'string' , boost : 50 , analyzer : 'comma' } ,
49
+ upvoters : { type : 'integer' , boost : 50 , index : 'not_analyzed' } ,
50
+ created_at : { type : 'date' , boost : 10 , index : 'not_analyzed' } ,
51
+ featured : { type : 'boolean' , index : 'not_analyzed' } ,
52
+ flagged : { type : 'boolean' , index : 'not_analyzed' } ,
53
+ created_automagically : { type : 'boolean' , index : 'not_analyzed' } ,
54
+ reviewed : { type : 'boolean' , index : 'not_analyzed' } ,
55
+ user : { type : 'multi_field' , index : 'not_analyzed' , fields : {
56
+ username : { type : 'string' , boost : 40 , index : 'not_analyzed' } ,
57
+ name : { type : 'string' , boost : 40 , index : 'not_analyzed' } ,
58
+ user_id : { type : 'integer' , boost : 40 , index : 'not_analyzed' } ,
59
+ profile_path : { type : 'string' , index : 'not_analyzed' } ,
60
+ avatar : { type : 'string' , index : 'not_analyzed' } ,
61
+ about : { type : 'string' , index : 'not_analyzed' } ,
62
+ } } } }
63
63
end
64
64
end
0 commit comments