Class: Fiona7::CustomVerityAccessor
- Inherits:
-
RailsConnector::SES::VerityAccessor
- Object
- RailsConnector::SES::VerityAccessor
- Fiona7::CustomVerityAccessor
- Defined in:
- lib/fiona7/custom_verity_accessor.rb
Instance Method Summary collapse
-
#initialize(query, options = {}) ⇒ CustomVerityAccessor
constructor
– Options: see VeritySearchRequest ++.
-
#search ⇒ Object
Queries the SES and returns a SearchResult.
Constructor Details
#initialize(query, options = {}) ⇒ CustomVerityAccessor
– Options: see VeritySearchRequest ++
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fiona7/custom_verity_accessor.rb', line 13 def initialize(query, = {}) @query = query @options = { :host => 'localhost', :port => 3011, :offset => 0, :limit => 10, :min_relevance => 50, :max_docs => 'unlimited', :parser => 'simple', :sort_order => [["score", "desc"], ["name", "asc"]], :collections => ['cm-contents'], :base_query => nil }.merge() @options[:collections] = Array([:collection]).flatten if .has_key?(:collection) end |
Instance Method Details
#search ⇒ Object
Queries the SES and returns a SearchResult.
Exceptions:
-
SearchError - SES reported an error.
35 36 37 |
# File 'lib/fiona7/custom_verity_accessor.rb', line 35 def search parse_response_payload(send_to_ses(build_request_payload)) end |