In \Drupal\search_api\Plugin\IndexPluginBase::__construct(), we currently have the following comment:

    // @todo Change key to, e.g., '*index', to avoid potential collisions.
    if (!empty($configuration['index']) && $configuration['index'] instanceof IndexInterface) {
      $this->setIndex($configuration['index']);
      unset($configuration['index']);
    }

Before we release a Beta version, we should decide whether we actually want to do this. I'd say it's probably a good idea – or can anyone think of a reason against it?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Status: Active » Needs review
FileSize
6.47 KB

Asked borisson_ for input on this, and he suggested using '#index' instead of '*index' – which does sound like a much better idea.
The attached patch implements this proposal.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Looks great!

  • drunken monkey committed f3d65b5 on 8.x-1.x
    Issue #2791031 by drunken monkey: Changed the "magic" plugin config key...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Good to hear, thanks for reviewing!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.