Class: Appfuel::ElasticSearch::Repository
Class Method Summary
collapse
Instance Method Summary
collapse
#apply_query_conditions, #build, #build_criteria, #build_default_entity, #build_domains, cache, create_mapper, #create_settings, #criteria?, #execute_query_method, #exists?, #find_entity_builder, #generate_uuid, inherited, #mapper, #query, #query_setup, #timestamp, #url_token
#app_container, #feature_name, included, #qualify_container_key
Class Method Details
.container_class_type ⇒ Object
5
6
7
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 5
def container_class_type
"#{super}.elastic_search"
end
|
Instance Method Details
22
23
24
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 22
def (results)
results["hits"]["hits"].map { |hit| hit["_source"] }
end
|
26
27
28
29
30
31
32
33
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 26
def (results)
documents = {}
results["hits"]["hits"].each do |hit|
documents[hit["_type"]] ||= []
documents[hit["_type"]] << hit["_source"]
end
documents
end
|
35
36
37
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 35
def (results)
results["hits"]["total"]
end
|
#storage_class(domain_name) ⇒ Object
10
11
12
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 10
def storage_class(domain_name)
mapper.storage_class('elastic_search', domain_name)
end
|
#to_entity(domain_name, storage) ⇒ Object
14
15
16
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 14
def to_entity(domain_name, storage)
super(domain_name, 'elastic_search', storage)
end
|
#to_storage(domain, opts = {}) ⇒ Object
18
19
20
|
# File 'lib/appfuel/storage/elastic_search/repository.rb', line 18
def to_storage(domain, opts = {})
super(domain, 'elastic_search', opts)
end
|