Class: Ecfr::SearchService::ContentVersion::HierarchicalResult

Inherits:
Ecfr::SearchService::ContentVersion show all
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

Attributes inherited from Base

#metadata, #request_data, #response_status, #results

Class Method Summary collapse

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

#inherited

Methods included from AttributeMethodDefinition

included, #initialize

Methods inherited from Client

build, cache_key, client, client_pool, delete, execute, get, handle_response, perform, post, purge

Methods included from ParallelClient

included

Constructor Details

This class inherits a constructor from Ecfr::Base

Instance Attribute Details

#children[HierarchicalCountNode] (readonly)

recursive array of results nested in their hierarchy

Returns:



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"

#countHierarchicalCount (readonly)

Returns:



8
9
# File 'lib/ecfr/search_service/content_version/hierarchichal_result.rb', line 8

attribute :count,
type: HierarchicalCount

#max_scoreFloat (readonly)

maximum score for all results

Returns:

  • (Float)


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_countInteger (readonly)

number of results returned

Returns:

  • (Integer)


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

Parameters:

Returns:



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