Creating custom subqueries
Last updated on
30 April 2025
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:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion