Fix search tests
This commit is contained in:
parent
204e6d86e2
commit
741d031444
2 changed files with 28 additions and 2 deletions
|
@ -38,6 +38,19 @@ class PublicStatusesIndex < Chewy::Index
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sudachi_analyzer: {
|
||||||
|
tokenizer: 'standard',
|
||||||
|
filter: %w(
|
||||||
|
lowercase
|
||||||
|
asciifolding
|
||||||
|
cjk_width
|
||||||
|
elision
|
||||||
|
english_possessive_stemmer
|
||||||
|
english_stop
|
||||||
|
english_stemmer
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
hashtag: {
|
hashtag: {
|
||||||
tokenizer: 'keyword',
|
tokenizer: 'keyword',
|
||||||
filter: %w(
|
filter: %w(
|
||||||
|
@ -126,7 +139,7 @@ class PublicStatusesIndex < Chewy::Index
|
||||||
},
|
},
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: PRODUCTION_SETTINGS
|
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: Rails.env.test? ? DEVELOPMENT_SETTINGS : PRODUCTION_SETTINGS
|
||||||
|
|
||||||
index_scope ::Status.unscoped
|
index_scope ::Status.unscoped
|
||||||
.kept
|
.kept
|
||||||
|
|
|
@ -37,6 +37,19 @@ class StatusesIndex < Chewy::Index
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sudachi_analyzer: {
|
||||||
|
tokenizer: 'standard',
|
||||||
|
filter: %w(
|
||||||
|
lowercase
|
||||||
|
asciifolding
|
||||||
|
cjk_width
|
||||||
|
elision
|
||||||
|
english_possessive_stemmer
|
||||||
|
english_stop
|
||||||
|
english_stemmer
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
hashtag: {
|
hashtag: {
|
||||||
tokenizer: 'keyword',
|
tokenizer: 'keyword',
|
||||||
filter: %w(
|
filter: %w(
|
||||||
|
@ -129,7 +142,7 @@ class StatusesIndex < Chewy::Index
|
||||||
},
|
},
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: PRODUCTION_SETTINGS
|
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: Rails.env.test? ? DEVELOPMENT_SETTINGS : PRODUCTION_SETTINGS
|
||||||
|
|
||||||
index_scope ::Status.unscoped.kept.without_reblogs.includes(
|
index_scope ::Status.unscoped.kept.without_reblogs.includes(
|
||||||
:media_attachments,
|
:media_attachments,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue