Skip to content

Instantly share code, notes, and snippets.

@levelingup
Created November 3, 2013 22:39
Show Gist options
  • Save levelingup/7295695 to your computer and use it in GitHub Desktop.
Save levelingup/7295695 to your computer and use it in GitHub Desktop.
Getting a 500 error with searchkick.
class Business < ActiveRecord::Base
searchkick
def search_data
{
service_name: services.map(&:name),
service_description: services.map(&:description)
}
end
end
@biz = Business.search(params[:q])
Tire::Search::SearchRequestFailed
500 : {"error":"SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[c0-iGUE8TBe8xjCZuFH3tA][businesses_development_20131103141603187][4]: SearchParseException[[businesses_development_20131103141603187][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: IllegalArgumentException[minimumSimilarity >= 1]; }{[c0-iGUE8TBe8xjCZuFH3tA][businesses_development_20131103141603187][2]: SearchParseException[[businesses_development_20131103141603187][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: IllegalArgumentException[minimumSimilarity >= 1]; }{[c0-iGUE8TBe8xjCZuFH3tA][businesses_development_20131103141603187][1]: SearchParseException[[businesses_development_20131103141603187][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"men\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: IllegalArgumentException[minimumSimilarity >= 1]; }]","status":500}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment