Class PluginSearch

java.lang.Object
net.storm.api.plugins.config.PluginSearch

public class PluginSearch extends Object
Utility class for searching and filtering plugins based on query strings.

PluginSearch provides fuzzy search functionality for the plugin list, matching plugins based on their names, keywords, and tags. Results are sorted by relevance, with exact matches and pinned plugins ranked higher.

Search algorithm:

  1. Filters plugins that match any search term in their keywords
  2. Sorts by pinned status (pinned first)
  3. Ranks exact name matches higher
  4. Ranks partial name matches (prefix and contains)
  5. Considers install count for popularity ranking

See Also:
  • Constructor Details

    • PluginSearch

      public PluginSearch()
  • Method Details

    • search

      public static <T extends SearchablePlugin> List<T> search(Collection<T> searchablePlugins, String query)
      Searches a collection of plugins for matches to the given query.
      Type Parameters:
      T - the type of searchable plugin
      Parameters:
      searchablePlugins - the collection of plugins to search
      query - the search query string
      Returns:
      a list of matching plugins, sorted by relevance