Is it possible to programmatically execute a node search? Maybe via NodeSearch or Drupal\search?
The closest I could get was to programmatically do stuff such as:
\Drupal::service('search.index')->clear();
echo \Drupal::service('plugin.manager.search')->getCacheMaxAge();
Note that I don't want to use search_api
but simply what Drupal 8 provides out of the box as a response to /search/node?keys=test
. Also note that I don't wish to integrate via HTTP.
nid
s which match and return them on a custom JSON api response.