Method: Pod::Source::Manager#updated_search_index
- Defined in:
- lib/cocoapods-core/source/manager.rb
#updated_search_index ⇒ Hash{String => Hash{String => Array<String>}}
Returns the search data. If a saved search data exists, retrieves it from file and returns it. Else, creates the search data from scratch, saves it to file system, and returns it. Search data is grouped by source repos. For each source, it contains a hash where keys are words and values are the pod names containing corresponding word.
For each source, list of unique words are generated from the following spec information.
- version
- summary
- description
-
198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/cocoapods-core/source/manager.rb', line 198 def updated_search_index index = stored_search_index || {} indexable_sources.each do |source| source_name = source.name unless index[source_name] CoreUI.print "Creating search index for spec repo '#{source_name}'.." index[source_name] = aggregate.generate_search_index_for_source(source) CoreUI.puts ' Done!' end end save_search_index(index) index end |