parent
108e390d23
commit
bb27ca14ef
@ -78,7 +78,7 @@ class SearchQueryTransformer < Parslet::Transform
|
|||||||
elsif clause[:shortcode]
|
elsif clause[:shortcode]
|
||||||
TermClause.new(prefix, operator, ":#{clause[:term]}:")
|
TermClause.new(prefix, operator, ":#{clause[:term]}:")
|
||||||
elsif clause[:phrase]
|
elsif clause[:phrase]
|
||||||
PhraseClause.new(prefix, operator, clause[:phrase].map { |p| p[:term].to_s }.join(' '))
|
PhraseClause.new(prefix, operator, clause[:phrase].is_a?(Array) ? clause[:phrase].map { |p| p[:term].to_s }.join(' ') : clause[:phrase].to_s)
|
||||||
else
|
else
|
||||||
raise "Unexpected clause type: #{clause}"
|
raise "Unexpected clause type: #{clause}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user