Problem/Motivation

Search API provides its own custom views data, fields, filters etc. which this module does not pick up on. It is therefore not possible to use the filter provided by this module in search API views. It should be.

Steps to reproduce

  1. Create or select a test site.
  2. Ensure you have this module, the search API module and a suitable backend (e.g. search_api_solr or the built in search_api_db module for testing)
  3. Ensure you have a vocabulary populated with terms in a tree.
  4. Ensure you have a node with a field which references this vocabulary.
  5. Ensure you have a search API server and index configured. The index should index the node from the steps above and the vocabulary field specifically.
  6. Create a search view of this index
  7. Open the add filter button. You will see that there is no entityreference_filter option available, though there should be a generic entity reference for the category

Proposed resolution

This seems to be pretty simple to resolve, at least for terms. We just need to add a very simple search API views plugin that extends the existing one and adjust the views data accordingly.

Remaining tasks

The patch I'm submitting only really works for terms. Search API doesn't seem to have an explicit entity reference filter for other entity nodes that I can see, at least not in the same way as it does for terms. This could probably be expanded to work for other entity references as well.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Dylan Donkersgoed created an issue. See original summary.

dylan donkersgoed’s picture

Status: Active » Needs review

maximkashuba made their first commit to this issue’s fork.

maximkashuba’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

The issue will be checked in 2.0.x branch.

maximkashuba’s picture

Thanks for the patch Dylan Donkersgoed.

Updated the patch and tests.

maximkashuba’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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