Module: Swiftype::Search
- Included in:
- DocumentType, Easy
- Defined in:
- lib/swiftype/search.rb
Constant Summary collapse
- VALID_SUGGEST_OPTIONS =
[:fetch_fields, :search_fields, :filters, :document_types, :functional_boosts, :page, :per_page]
- VALID_SEARCH_OPTIONS =
[:fetch_fields, :search_fields, :filters, :document_types, :functional_boosts, :page, :per_page, :sort_field, :sort_direction]
Instance Method Summary collapse
- #parse_options(options, valid_options) ⇒ Object
- #parse_search_options(options) ⇒ Object
- #parse_suggest_options(options) ⇒ Object
Instance Method Details
#parse_options(options, valid_options) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/swiftype/search.rb', line 14 def (, ) = {} .each do |option_name| next unless [option_name] [option_name] = [option_name] end end |
#parse_search_options(options) ⇒ Object
6 7 8 |
# File 'lib/swiftype/search.rb', line 6 def () (, VALID_SEARCH_OPTIONS) end |
#parse_suggest_options(options) ⇒ Object
10 11 12 |
# File 'lib/swiftype/search.rb', line 10 def () (, VALID_SUGGEST_OPTIONS) end |