Search API

Drupal 7: Ensure HOOK_node_view is not called by search indexing

When using HOOK_node_view() you should take care because when the search (Search API especially) is indexing, this hook is also being called. You can not rely on a user displaying the node display currently. Here's a way to ensure this...

  1. function MYMODULE_node_view($node, $view_mode, $langcode) {
  2.   if ($view_mode != 'full' || arg(0) != 'node') {

Linktipp: Drupal 7 Views 3: Search in nodes via Search API with node as base table (does not seem possible)

Note to myself: If you used the search.module (Core) before and switch to Search API, there seems to be no valid replacement for Views search fields if using "node" as base table.

You have to use the search api tables as base table like documented in the linked document below.

Please tell me, if there is an other solution. Converting all views is simply too big.