Class: Ecfr::SearchService::ContentVersion::HierarchicalResult
- Inherits:
-
Ecfr::SearchService::ContentVersion
- Object
- Client
- Base
- Base
- Ecfr::SearchService::ContentVersion
- Ecfr::SearchService::ContentVersion::HierarchicalResult
- Defined in:
- lib/ecfr/search_service/content_version/hierarchichal_result.rb
Constant Summary collapse
- HIERARCHICAL_COUNTS_PATH =
"v1/counts/hierarchy"
Constants inherited from Base
Base::SUPPORTED_ARRAY_ACCESSORS
Instance Attribute Summary collapse
-
#children ⇒ [HierarchicalCountNode]
readonly
recursive array of results nested in their hierarchy.
- #count ⇒ HierarchicalCount readonly
-
#max_score ⇒ Float
readonly
maximum score for all results.
-
#shown_count ⇒ Integer
readonly
number of results returned.
Attributes inherited from Base
#metadata, #request_data, #response_status, #results
Class Method Summary collapse
-
.find(args) ⇒ <HierarchicalResult>
Retrieves results of search query as a hierarchical structure.
Methods inherited from Ecfr::SearchService::ContentVersion
count, hierarchical_search, search, suggestions, summary
Methods inherited from Base
base_url, service_name, service_path
Methods inherited from Base
basic_auth_client_options, #each, #initialize, metadata, metadata_key, result_key
Methods included from Extensible
Methods included from AttributeMethodDefinition
Methods inherited from Client
build, cache_key, client, client_pool, delete, execute, get, handle_response, perform, post, purge
Methods included from ParallelClient
Constructor Details
This class inherits a constructor from Ecfr::Base
Instance Attribute Details
#children ⇒ [HierarchicalCountNode] (readonly)
recursive array of results nested in their hierarchy
19 20 21 |
# File 'lib/ecfr/search_service/content_version/hierarchichal_result.rb', line 19 attribute :children, type: Array(HierarchicalCountNode), desc: "recursive array of results nested in their hierarchy" |
#count ⇒ HierarchicalCount (readonly)
8 9 |
# File 'lib/ecfr/search_service/content_version/hierarchichal_result.rb', line 8 attribute :count, type: HierarchicalCount |
#max_score ⇒ Float (readonly)
maximum score for all results
11 12 13 |
# File 'lib/ecfr/search_service/content_version/hierarchichal_result.rb', line 11 attribute :max_score, type: :float, desc: "maximum score for all results" |
#shown_count ⇒ Integer (readonly)
number of results returned
15 16 17 |
# File 'lib/ecfr/search_service/content_version/hierarchichal_result.rb', line 15 attribute :shown_count, type: :integer, desc: "number of results returned" |
Class Method Details
.find(args) ⇒ <HierarchicalResult>
Retrieves results of search query as a hierarchical structure
32 33 34 35 36 37 38 |
# File 'lib/ecfr/search_service/content_version/hierarchichal_result.rb', line 32 def self.find(args) perform( :get, HIERARCHICAL_COUNTS_PATH, params: args ) end |