Class: Ecfr::SearchService::ContentVersion::Suggestion
- Inherits:
-
Ecfr::SearchService::ContentVersion
- Object
- Client
- Base
- Base
- Ecfr::SearchService::ContentVersion
- Ecfr::SearchService::ContentVersion::Suggestion
- Defined in:
- lib/ecfr/search_service/content_version/suggestion.rb
Constant Summary collapse
- SUGGESTIONS_PATH =
"v1/suggestions"
Constants inherited from Base
Base::SUPPORTED_ARRAY_ACCESSORS
Instance Attribute Summary collapse
-
#global_search_results ⇒ Integer
readonly
total number of matching full text search results.
-
#headings ⇒ Ecfr::Common::Hierarchy
readonly
the descriptive portion of the CFR level.
-
#hierarchy ⇒ Ecfr::Common::Hierarchy
readonly
the shortened identifier portion of the CFR level.
-
#hierarchy_headings ⇒ Ecfr::Common::Hierarchy
readonly
the full identifier portion of the CFR level.
-
#highlight ⇒ String
readonly
text containing ‘<mark>’ tags the denote where the query was found by the search engine - only type: ‘autocomplete’.
-
#narrowed_hierarchy ⇒ Ecfr::Common::Hierarchy
readonly
the hierarchy that the narrowed_search_results have been limited to.
-
#narrowed_search_results ⇒ Integer
readonly
number of search results that match the current hierarchy.
-
#removed ⇒ Date
readonly
the date that this portion of the CFR that was removed.
-
#reserved ⇒ Boolean
readonly
whether the result represents a portion of the CFR that is Reserved.
-
#structure_index ⇒ Integer
readonly
an integer representing the location of the suggestion in the source xml for it’s corresponding title.
-
#type ⇒ String
readonly
the type of suggestion, currently ‘cfr_reference’ or ‘autocomplete’.
Attributes inherited from Base
#metadata, #request_data, #response_status, #results
Class Method Summary collapse
-
.find(args) ⇒ <Suggestion>
Retreive suggestions for the given search args.
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
#global_search_results ⇒ Integer (readonly)
total number of matching full text search results
41 42 43 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 41 :global_search_results, type: :integer, desc: "total number of matching full text search results" |
#headings ⇒ Ecfr::Common::Hierarchy (readonly)
the descriptive portion of the CFR level
29 30 31 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 29 attribute :headings, type: Ecfr::Common::Hierarchy, desc: "the descriptive portion of the CFR level" |
#hierarchy ⇒ Ecfr::Common::Hierarchy (readonly)
the shortened identifier portion of the CFR level
32 33 34 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 32 attribute :hierarchy, type: Ecfr::Common::Hierarchy, desc: "the shortened identifier portion of the CFR level" |
#hierarchy_headings ⇒ Ecfr::Common::Hierarchy (readonly)
the full identifier portion of the CFR level
35 36 37 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 35 attribute :hierarchy_headings, type: Ecfr::Common::Hierarchy, desc: "the full identifier portion of the CFR level" |
#highlight ⇒ String (readonly)
text containing ‘<mark>’ tags the denote where the query was found by the search engine - only type: ‘autocomplete’
7 8 9 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 7 attribute :highlight, desc: "text containing '<mark>' tags the denote where the query was found by the search engine - only type: 'autocomplete'" |
#narrowed_hierarchy ⇒ Ecfr::Common::Hierarchy (readonly)
the hierarchy that the narrowed_search_results have been limited to
48 49 50 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 48 :narrowed_hierarchy, type: Ecfr::Common::Hierarchy, desc: "the hierarchy that the narrowed_search_results have been limited to" |
#narrowed_search_results ⇒ Integer (readonly)
number of search results that match the current hierarchy
44 45 46 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 44 :narrowed_search_results, type: :integer, desc: "number of search results that match the current hierarchy" |
#removed ⇒ Date (readonly)
the date that this portion of the CFR that was removed
19 20 21 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 19 attribute :removed, type: :date, desc: "the date that this portion of the CFR that was removed" |
#reserved ⇒ Boolean (readonly)
whether the result represents a portion of the CFR that is Reserved
15 16 17 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 15 attribute :reserved, type: :boolean, desc: "whether the result represents a portion of the CFR that is Reserved" |
#structure_index ⇒ Integer (readonly)
an integer representing the location of the suggestion in the source xml for it’s corresponding title. Useful for sorting. Only type: ‘autocomplete’
23 24 25 26 27 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 23 attribute :structure_index, type: :integer, desc: "an integer representing the location of the suggestion in the source xml for it's corresponding title. Useful for sorting. Only type: 'autocomplete'" |
#type ⇒ String (readonly)
the type of suggestion, currently ‘cfr_reference’ or ‘autocomplete’
12 13 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 12 attribute :type, desc: "the type of suggestion, currently 'cfr_reference' or 'autocomplete'" |
Class Method Details
.find(args) ⇒ <Suggestion>
Retreive suggestions for the given search args
66 67 68 69 70 71 72 |
# File 'lib/ecfr/search_service/content_version/suggestion.rb', line 66 def self.find(args) perform( :get, SUGGESTIONS_PATH, params: args.except(:order, :page, :per_page).stringify_keys ) end |