We saw some serious performance issues with a customer using the 6.x branch - possibly the same bug is present in 7.x.
see: http://www.derivante.com/2009/04/27/100x-increase-in-solr-performance-an...
In apachesolr.module in 7.x we handle this problem with the following code:
if (strlen($keys) == 0 && ($filters = $query->getFilters())) {
// Move the fq params to q.alt for better performance. Only suitable
// when using dismax or edismax, so we keep this out of the query class itself
// for now.
$qalt = array();
foreach ($filters as $delta => $filter) {
// Move the fq param if it has no local params and is not negative.
if (!$filter['#exclude'] && !$filter['#local']) {
$qalt[] = '(' . $query->makeFilterQuery($filter) . ')';
$query->removeFilter($filter['#name'], $filter['#value'], $filter['#exclude']);
}
}
if ($qalt) {
$query->addParam('q.alt', implode(' ', $qalt));
}
}
There is similar code in 6.x-1.x
Comments
Comment #1
pwolanin commentedComment #2
pwolanin commentedObviously if you are using the standard query parser you can do the same thing by setting the q param, as described in the blog post above.
Comment #3
rjbrown99 commentedpwolanin - Can you clarify where you are applying this logic in the module? IE - what function in apachesolr.module? apachesolr_views_views_post_execute() perhaps?
Comment #4
pwolanin commentedThe code I posted above is in apachesolr.module in function apachesolr_do_query()
Comment #5
rjbrown99 commentedAaah thank you - this issue is in the apachesolr_views issue queue which is where my confusion came from.
Comment #6
ygerasimov commented7.x branch does use apachesolr_do_query() to perform the query. Moving this issue to 6.x branch.
Comment #6.0
ygerasimov commentednote 6.x
Comment #7
kenorb commentedVersion 6.x is no longer supported due to Drupal 6 End of Life. This issue is fixed for 7.x as per #6