We have a few custom modules that generate pages on our site, along with views that create pages.

How do we index those pages with elasticsearch_connector?

Comments

brettboylen created an issue. See original summary.

mparker17’s picture

Version: 8.x-5.x-dev » 9.0.x-dev
Component: Elasticsearch Connector » Code
Status: Active » Fixed

@brettboylen, I'm sorry for how long it has taken someone to answer your support request.

Under the hood, the Elasticsearch Connector module uses the Search API module, which only indexes content entities and their fields.

Views are configuration entities (i.e.: not content entities), so Search API is unable to index the things that a view displays. That being said, the things that Views displays are typically content entities, so in most cases, site administrators simply index the content entities themselves.

Unfortunately, any module that extends Search API will have the same limitation (and Drupal core's built-in basic Search module only indexes content entities too).


All that being said, there may be a way to accomplish something similar to what you want.

If you have content entities which you want to appear in search results, but you want visitors who click on that search result to land on a View, you might be able to use the Rabbit Hole module to redirect them to the view.

Or, if you want to create a landing page with content that contains a view, you might want to try the EVA: Entity Views Attachment module. You may be able to combine this solution with the Rabbit Hole module.

If you need something more sophisticated and you're willing to write and maintain custom code, Search API and Elasticsearch Connector allow you to alter search results before they're displayed - for example Search API's ProcessingResultsEvent and/or Search API Processor plugins are able to modify search results returned by the index.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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