Class: DefaultIndex

Inherits:
Chewy::Index
  • Object
show all
Defined in:
app/chewy/default_index.rb

Direct Known Subclasses

GamesIndex, WorksIndex

Class Method Summary collapse

Class Method Details

.default_settingsObject


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
# File 'app/chewy/default_index.rb', line 2

def self.default_settings
	{
		analysis: {
			filter: {
				my_synonym_filter: {
					type: "synonym",
					synonyms: [
						"littlebigplanet,little big planet",
						"megaman,mega man",
						"i,1",
						"ii,2",
						"iii,3",
						"iv,4",
						"v,5",
						"vi,6",
						"vii,7",
						"viii,8",
						"ix,9",
						"x,10",
						"xi,11",
						"xii,12",
						"xiii,13",
						"xiv,14",
						"xv,15",
						"xvi,16",
						"xvii,17",
						"xviii,18",
						"xix,19",
						"xx,20",
						"farcry,far cry",
						"bioshock,bio shock",
						"olliolli,olli olli",
						"actraiser,act raiser",
						"gta,grand theft auto"
					]
				}
			},
			analyzer: {
				title: {
					tokenizer: 'standard',
					filter: ['lowercase', 'asciifolding', "my_synonym_filter"]
				}
			}
		}
	}
end