Created
November 3, 2013 22:39
-
-
Save levelingup/7295695 to your computer and use it in GitHub Desktop.
Getting a 500 error with searchkick.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Business < ActiveRecord::Base | |
searchkick | |
def search_data | |
{ | |
service_name: services.map(&:name), | |
service_description: services.map(&:description) | |
} | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@biz = Business.search(params[:q]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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