Indexing custom entity types
To answer the question, if an entity wants to be included in drupal search, it has to provide a search plugin, which is when discovered listed by the plugin manager from the search module. If not you should first check the annotations of the plugin, see for example the plugin from the node entity:

namespace Drupal\node\Plugin\Search;

/**
 * Handles searching for node entities using the Search module index.
 *
 * @SearchPlugin(
 *   id = "node_search",
 *   title = @Translation("Content")
 * )
 */
class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInterface, SearchIndexingInterface {


To debug this, clear the cache and list the discovered plugins:

drush ev "var_dump(\Drupal::service('plugin.manager.search')-&gt;getDefinitions())"


If all went well you have a third plugin here together with the node and user plugin and you should see it in the admin UI of the search module in the select box Search page type.



To give a recommendation, I agree with the commment from @Berdir. It's not worth the effort to write a custom search plugins, better use Search API:


  This module provides a framework for easily creating searches on any
  entity known to Drupal, using any kind of search engine.