1

We're using the searchkick gem in our app and have many documents with fields that contains special characters such as apostrophes, e.g. an offer with the title Valentine's Day Special.

Without boosters, a search for Valentines or Valentine's or Valentine would return the correct search results:

Activity.search "Valentines"

However when boosters for those the title field is incorporated, a search of any of the above queries will not return the Valentine's Day Special result.

Activity.search "Valentines", fields: ["title^10"]

I've been trying to troubleshoot through the Elasticsearch/ Searckick documentation but haven't found a solution yet. Anyone else encountered this problem?

Wei Jia Chen
  • 174
  • 12

1 Answers1

0

Resolved this with a partial work match workaround:

Offer.search("Valentine's", fields: ["name"], match: :word_middle)
Wei Jia Chen
  • 174
  • 12