Commit 2026552605661ea1567847638ca9fc2297afd932

Authored by Andrew
1 parent e6b57f63

Revert "Simplify generated queries"

This reverts commit e6b57f637ce82b129d3e2e039ce86456d1495385.
Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
lib/searchkick/query.rb
... ... @@ -349,7 +349,11 @@ module Searchkick
349 349 if field =~ /\.word_(start|middle|end)\z/ && searchkick_options[:word] != false
350 350 queries_to_add << {
351 351 bool: {
352   - must: q2,
  352 + must: {
  353 + bool: {
  354 + should: q2
  355 + }
  356 + },
353 357 should: {match_type => {field.sub(/\.word_(start|middle|end)\z/, ".analyzed") => qs.first}}
354 358 }
355 359 }
... ...