Class: MDEXClient::MData::Search
- Defined in:
- lib/mdex_client/mdata/search.rb
Constant Summary collapse
- MODES =
%w(All AllAny AllPartial Any Boolean Partial PartialMax Unknown)
Instance Attribute Summary collapse
-
#enable_snippeting ⇒ Object
Returns the value of attribute enable_snippeting.
-
#key ⇒ Object
Returns the value of attribute key.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#query ⇒ Object
Returns the value of attribute query.
-
#relevance_ranking_strategy ⇒ Object
Returns the value of attribute relevance_ranking_strategy.
-
#snippet_length ⇒ Object
Returns the value of attribute snippet_length.
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#css, #dimension_value_state_list, #initialize, #initialize_from_element!, #property_list, #record_list, #xpath
Constructor Details
This class inherits a constructor from MDEXClient::MData::Node
Instance Attribute Details
#enable_snippeting ⇒ Object
Returns the value of attribute enable_snippeting.
8 9 10 |
# File 'lib/mdex_client/mdata/search.rb', line 8 def enable_snippeting @enable_snippeting end |
#key ⇒ Object
Returns the value of attribute key.
8 9 10 |
# File 'lib/mdex_client/mdata/search.rb', line 8 def key @key end |
#mode ⇒ Object
Returns the value of attribute mode.
8 9 10 |
# File 'lib/mdex_client/mdata/search.rb', line 8 def mode @mode end |
#query ⇒ Object
Returns the value of attribute query.
8 9 10 |
# File 'lib/mdex_client/mdata/search.rb', line 8 def query @query end |
#relevance_ranking_strategy ⇒ Object
Returns the value of attribute relevance_ranking_strategy.
8 9 10 |
# File 'lib/mdex_client/mdata/search.rb', line 8 def relevance_ranking_strategy @relevance_ranking_strategy end |
#snippet_length ⇒ Object
Returns the value of attribute snippet_length.
8 9 10 |
# File 'lib/mdex_client/mdata/search.rb', line 8 def snippet_length @snippet_length end |
Instance Method Details
#write_xml!(xml) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/mdex_client/mdata/search.rb', line 11 def write_xml!(xml) attributes = { "Key" => key } %w(RelevanceRankingStrategy Mode SnippetLength EnableSnippeting).each do |attribute| value = send(attribute.underscore) attributes[attribute] = value.to_s if value end xml.mdata :Search, attributes, query end |