With entity_view(), there is now an easy way to index the entity completely, like it would be displayed to a user. This might in many cases provide the most accurate search results and is therefore a good candidate for a future data alteration.
The plugin would probably just prompt the user to select a view mode and would then add a fulltext field with the complete viewed entity as HTML.
Pretty simple but potentially a great feature.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey’s picture

Component: Code » Plugins
fago’s picture

subscribing, sounds neat.

drunken monkey’s picture

Status: Active » Needs review
FileSize
4.9 KB

Attached is a first draft of this, which seems to work fine.

While testing this, I also found the bug #1081188: entity_view() for comments is broken.

drunken monkey’s picture

Title: Add data alteration for indexing the viewed entity » Add a data alteration for indexing the viewed entity

Committed.

drunken monkey’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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