Class: LogMagic::SearchkickExplainer

Inherits:
BaseExplainer show all
Defined in:
lib/log_magic/explainers/searchkick_explainer.rb

Defined Under Namespace

Classes: AnalyzerExplainerSection, BoostExplainerSection, CustomAnalyzerHover, DisMaxExplainerSection, FuzzyTranspositionsSection, MatchExplainerSection, MaxExpansionsSection, QueryExplainerSection, SettingsExplainerSection, UnderscoreAllExplainerSection

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseExplainer

#initialize, #start

Methods included from TemplatingUtils

#enriche, #initialize, #match_regex, #rendered_template, #template_dir, #template_path

Methods included from JSONUtils

#parse_json, #pretty_print_json, #query_hash

Constructor Details

This class inherits a constructor from LogMagic::BaseExplainer

Class Method Details

.port_numberObject



6
7
8
# File 'lib/log_magic/explainers/searchkick_explainer.rb', line 6

def self.port_number
  7467
end

Instance Method Details

#elasticsearch_urlObject



14
15
16
# File 'lib/log_magic/explainers/searchkick_explainer.rb', line 14

def elasticsearch_url
  @persistance_layer.retrieve_value(@uuid, 'elasticsearch_url')
end

#explained_queryObject



22
23
24
25
26
# File 'lib/log_magic/explainers/searchkick_explainer.rb', line 22

def explained_query
  @query_explainer = QueryExplainerSection.new(query_json)
  settings_explainer_section.enriche_query_json
  @query_explainer
end

#query_jsonObject



10
11
12
# File 'lib/log_magic/explainers/searchkick_explainer.rb', line 10

def query_json
  @persistance_layer.retrieve_value(@uuid, 'query_json')
end

#settings_explainer_sectionObject



18
19
20
# File 'lib/log_magic/explainers/searchkick_explainer.rb', line 18

def settings_explainer_section
  SettingsExplainerSection.new(elasticsearch_url, @query_explainer)
end

#template_nameObject



28
29
30
# File 'lib/log_magic/explainers/searchkick_explainer.rb', line 28

def template_name
  'searchkick.haml'
end