Problem/Motivation

When defining a custom property in code using type solr_string_storage it does not show in the UI.

Message

Steps to reproduce

Create a custom plugin based on \Drupal\search_api\Processor\ProcessorPluginBase

    if (empty($datasource)) {
      $definition = [
        'label' => $this->t('Stored entity fields'),
        'description' => $this->t('Stores the pre-processed fields of an entity.'),
        'type' => 'solr_string_storage',
        'processor_id' => $this->getPluginId(),
        'is_list' => FALSE,
      ];
      // Using an underscore at the beginning to avoid clash with custom
      // fields added by the providers.
      $properties['_stored_entity_fields'] = new ProcessorProperty($definition);

Proposed resolution

Show the field in the UI.

Remaining tasks

Show the field in the UI.

CommentFileSizeAuthor
Screenshot from 2021-04-23 10-24-33.png34.2 KBattiks

Comments

attiks created an issue. See original summary.

drunken monkey’s picture

Status: Active » Postponed (maintainer needs more info)

If it’s a processor-defined property, why not just change it to a type that is already supported – like string, search_api_text or search_api_html?

attiks’s picture

That will probably work as well, was only expecting to have all fields show in the UI. The field data is set in code and does not have to be indexed, is only used to avoid entity loads after getting solr results back.

Feel free to close this

drunken monkey’s picture

Category: Bug report » Support request
Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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