Commit 959ba67e authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥 Committed by Jeffrey Phillips Freeman
Browse files

Revert: "Set up elasticsearch 7 to use sudachi"

This reverts commit ceabee16.
parent 1748c907
......@@ -6,6 +6,21 @@ GIT
health_check (4.0.0.pre)
rails (>= 4.0)
GIT
remote: https://github.com/rtomayko/posix-spawn
revision: 58465d2e213991f8afb13b984854a49fcdcc980c
ref: 58465d2e213991f8afb13b984854a49fcdcc980c
specs:
posix-spawn (0.3.13)
GIT
remote: https://github.com/tmm1/http_parser.rb
revision: 54b17ba8c7d8d20a16dfc65d1775241833219cf2
ref: 54b17ba8c7d8d20a16dfc65d1775241833219cf2
submodules: true
specs:
http_parser.rb (0.6.1)
GIT
remote: https://github.com/witgo/nilsimsa
revision: fd184883048b922b176939f851338d0a4971a532
......
......@@ -12,19 +12,6 @@ class AccountsIndex < Chewy::Index
tokenizer: 'edge_ngram',
filter: %w(lowercase asciifolding cjk_width),
},
sudachi_content: {
tokenizer: 'sudachi_tokenizer',
type: 'custom',
filter: %w(
lowercase
cjk_width
sudachi_part_of_speech
sudachi_ja_stop
sudachi_baseform
search
),
},
},
normalizer: {
......@@ -40,20 +27,6 @@ class AccountsIndex < Chewy::Index
min_gram: 1,
max_gram: 15,
},
sudachi_tokenizer: {
type: 'sudachi_tokenizer',
discard_punctuation: true,
resources_path: '/etc/elasticsearch',
settings_path: '/etc/elasticsearch/sudachi.json',
},
},
filter: {
search: {
type: 'sudachi_split',
mode: 'search',
},
},
}
......@@ -71,10 +44,6 @@ class AccountsIndex < Chewy::Index
field :actor_type, type: 'keyword', normalizer: 'keyword'
field :text, type: 'text', value: ->(account) { account.index_text } do
field :stemmed, type: 'text', analyzer: 'sudachi_content'
end
field :discoverable, type: 'boolean'
field :following_count, type: 'long', value: ->(account) { account.following.local.count }
......
......@@ -2,32 +2,31 @@
class StatusesIndex < Chewy::Index
settings index: { refresh_interval: '15m' }, analysis: {
tokenizer: {
sudachi_tokenizer: {
type: 'sudachi_tokenizer',
discard_punctuation: true,
resources_path: '/etc/elasticsearch',
settings_path: '/etc/elasticsearch/sudachi.json',
filter: {
english_stop: {
type: 'stop',
stopwords: '_english_',
},
english_stemmer: {
type: 'stemmer',
language: 'english',
},
english_possessive_stemmer: {
type: 'stemmer',
language: 'possessive_english',
},
},
analyzer: {
content: {
tokenizer: 'uax_url_email',
filter: %w(
english_possessive_stemmer
lowercase
asciifolding
cjk_width
sudachi_part_of_speech
sudachi_ja_stop
sudachi_baseform
search
english_stop
english_stemmer
),
tokenizer: 'sudachi_tokenizer',
type: 'custom',
},
},
filter: {
search: {
type: 'sudachi_split',
mode: 'search',
},
},
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment