Class: AgnosticBackend::Cloudsearch::Index
- Defined in:
- lib/agnostic_backend/cloudsearch/index.rb
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
readonly
Returns the value of attribute access_key_id.
-
#document_endpoint ⇒ Object
readonly
Returns the value of attribute document_endpoint.
-
#domain_name ⇒ Object
readonly
Returns the value of attribute domain_name.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#search_endpoint ⇒ Object
readonly
Returns the value of attribute search_endpoint.
-
#secret_access_key ⇒ Object
readonly
Returns the value of attribute secret_access_key.
Attributes inherited from Index
Instance Method Summary collapse
- #cloudsearch_client ⇒ Object
- #cloudsearch_domain_client ⇒ Object
- #configure ⇒ Object
- #indexer ⇒ Object
- #query_builder ⇒ Object
- #schema ⇒ Object
Methods inherited from Index
#initialize, #name, #parse_option, #primary?
Constructor Details
This class inherits a constructor from AgnosticBackend::Index
Instance Attribute Details
#access_key_id ⇒ Object (readonly)
Returns the value of attribute access_key_id.
5 6 7 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 5 def access_key_id @access_key_id end |
#document_endpoint ⇒ Object (readonly)
Returns the value of attribute document_endpoint.
5 6 7 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 5 def document_endpoint @document_endpoint end |
#domain_name ⇒ Object (readonly)
Returns the value of attribute domain_name.
5 6 7 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 5 def domain_name @domain_name end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
5 6 7 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 5 def region @region end |
#search_endpoint ⇒ Object (readonly)
Returns the value of attribute search_endpoint.
5 6 7 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 5 def search_endpoint @search_endpoint end |
#secret_access_key ⇒ Object (readonly)
Returns the value of attribute secret_access_key.
5 6 7 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 5 def secret_access_key @secret_access_key end |
Instance Method Details
#cloudsearch_client ⇒ Object
28 29 30 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 28 def cloudsearch_client @cloudsearch_client ||= Aws::CloudSearch::Client.new(region: region, access_key_id: access_key_id, secret_access_key: secret_access_key) end |
#cloudsearch_domain_client ⇒ Object
32 33 34 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 32 def cloudsearch_domain_client @cloudsearch_domain_client ||= Aws::CloudSearchDomain::Client.new(endpoint: search_endpoint, access_key_id: access_key_id, secret_access_key: secret_access_key) end |
#configure ⇒ Object
24 25 26 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 24 def configure define_fields_in_domain(indexer.flatten(schema)) end |
#indexer ⇒ Object
12 13 14 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 12 def indexer AgnosticBackend::Cloudsearch::Indexer.new(self) end |
#query_builder ⇒ Object
16 17 18 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 16 def query_builder AgnosticBackend::Queryable::Cloudsearch::QueryBuilder.new(self) end |
#schema ⇒ Object
20 21 22 |
# File 'lib/agnostic_backend/cloudsearch/index.rb', line 20 def schema @schema ||= @indexable_klass.schema{|ftype| ftype} end |