forked from maksrom/javascript-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb-js.json
More file actions
executable file
·81 lines (81 loc) · 2.18 KB
/
db-js.json
File metadata and controls
executable file
·81 lines (81 loc) · 2.18 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"//": "to preserve special chars: http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html",
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"default": {
"type": "custom",
"char_filter": [
"delimit-dot-inside-word"
],
"tokenizer": "standard",
"filter": [
"lowercase",
"russian_morphology",
"english_morphology"
]
}
},
"//": "char_filter applied before tokenization",
"//": "see the result: curl 'localhost:9200/js/_analyze?analyzer=default&pretty=true' -d 'win.resizeBy'",
"char_filter": {
"delimit-dot-inside-word" : {
"//": "win.resizeBy usually a single word, make it 2 words",
"type" : "pattern_replace",
"pattern" : "(\\S)\\.(\\S)",
"replacement" : "$1. $2"
}
},
"//": "not using stopwords, they help performance, but make search phrases with them impossible"
}
},
"mappings": {
"articles": {
"dynamic": false,
"properties": {
"modified": {"type": "date"},
"isFolder": {"type": "boolean"},
"search": {
"type": "string",
"index_options": "offsets"
},
"weight": {
"type": "long"
},
"slug": {
"type": "string",
"index": "not_analyzed"
},
"title": {
"type": "string",
"index_options": "offsets"
}
}
},
"tasks": {
"dynamic": false,
"properties": {
"modified": {"type": "date"},
"solution": {"type": "string"},
"search": {
"type": "string",
"index_options": "offsets"
},
"weight": {
"type": "long"
},
"slug": {
"type": "string",
"index": "not_analyzed"
},
"title": {
"type": "string",
"index_options": "offsets"
},
"importance": {"type": "long"}
}
}
}
}