* Fix: #370 ダブルクオートを使った日本語検索が効かない * Add test for multiple words * Improve test * 入れ替え * 単語検索のテスト
This commit is contained in:
parent
b044cbeb63
commit
d864399a09
5 changed files with 56 additions and 4 deletions
|
@ -237,7 +237,7 @@ class SearchQueryTransformer < Parslet::Transform
|
|||
else
|
||||
# Memo for checking when manually merge
|
||||
# { multi_match: { type: 'most_fields', query: @term, fields: ['text', 'text.stemmed'], operator: 'and' } }
|
||||
{ match_phrase: { text: { query: @term } } }
|
||||
{ multi_match: { type: 'most_fields', query: @term, fields: ['text', 'text.stemmed'], operator: 'and' } }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -251,6 +251,8 @@ class SearchQueryTransformer < Parslet::Transform
|
|||
end
|
||||
|
||||
def to_query
|
||||
# Memo for checking when manually merge
|
||||
# { match_phrase: { text: { query: @phrase } } }
|
||||
{ match_phrase: { text: { query: @phrase } } }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue