When using an apache solr view on a search page that completes a different search query causes the view to return the same results as the page search.
This is because the cache keys off of the searcher name. The base solr query searcher name is generated as
/**
* Get query searcher name (for facetapi, views, pages, etc).
*/
public function getSearcher() {
return $this->name . '@' . $this->solr->getId();
}
The ApachesolrViewsSolrBaseQuery returns the same based on inheritance. I worked around this by overriding the getSearcher method in this class to append the view name. Which should also allow multiple views on the same page to return different results as well.
/**
* Get query searcher name (for facetapi, views, pages, etc).
*/
public function getSearcher() {
return $this->name . '@' . $this->solr->getId() . "." . $this->view->name;
}
Comments
Comment #2
MiroslavBanov CreditAttribution: MiroslavBanov at FFW commentedPretty sure that #1766254-32: Problem with multiple views (or displays) in same page fixes this one as well.