Creating custom subqueries

Last updated on
30 April 2025

You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules

To create subqueries in Drupal 7, do the following in your hook_apachesolr_query_alter(&$query):

$subquery = apachesolr_drupal_query("Subquery name");

$subquery->addFilter('tid', 4);

$query->addFilterSubQuery($subquery);

Hope this helps!

Help improve this page

Page status: Not set

You can: