From eec777fa8522ded283aab9af4dc3245d6065084b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 18 Jun 2020 05:50:12 -0700 Subject: [PATCH] Use consistent method names --- lib/searchkick/index_options.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/searchkick/index_options.rb b/lib/searchkick/index_options.rb index 85dc6e7..86cfa18 100644 --- a/lib/searchkick/index_options.rb +++ b/lib/searchkick/index_options.rb @@ -8,7 +8,7 @@ module Searchkick def index_options custom_mapping = options[:mappings] || {} - if below70 && custom_mapping.keys.map(&:to_sym).include?(:properties) + if below70? && custom_mapping.keys.map(&:to_sym).include?(:properties) # add type custom_mapping = {index_type => custom_mapping} end @@ -172,7 +172,7 @@ module Searchkick settings[:similarity] = {default: {type: options[:similarity]}} end - unless below62 + unless below62? settings[:index] = { max_ngram_diff: 49, max_shingle_diff: 4 @@ -411,7 +411,7 @@ module Searchkick ] } - if below70 + if below70? mappings = {index_type => mappings} end @@ -453,7 +453,7 @@ module Searchkick type: "synonym_graph", synonyms_path: search_synonyms } - synonym_graph[:updateable] = true unless below73 + synonym_graph[:updateable] = true unless below73? else synonym_graph = { type: "synonym_graph", @@ -507,15 +507,15 @@ module Searchkick :searchkick_index end - def below62 + def below62? Searchkick.server_below?("6.2.0") end - def below70 + def below70? Searchkick.server_below?("7.0.0") end - def below73 + def below73? Searchkick.server_below?("7.3.0") end end -- libgit2 0.21.0