Facet API pretty paths in combination with solr search form I'm building a website with the panopoly distribution in Drupal 7. One of the client requests is a faceted search page combined with a search box to search on specific keywords and the possibility to sort on date and name.

To build this I used the following modules:


apachesolr
apachesolr_sorts
apachesolr_panels


After configuring everything I got this search page working (without clean url's)

http://i.imgur.com/mxDzhi4.png



To enable clean url's I used the following module:


facetapi_pretty_paths


Now the search box always uses the first argument in the url, after I enable the pretty paths module the first argument in the url is the active filter (taxonomy field name in combination with the taxonomy term name).

http://i.imgur.com/5x7Xyoa.png



What would be the best approach to use the search box in combination with the facets and pretty paths (and the sorting option)?
There are two ways to avoid this issue which depend on module what you use.

1) If Search API module is used. (It was taken from https://www.drupal.org/node/2625298)

function hook_search_api_query_alter(SearchApiQueryInterface $query) {
    $original_keys = $query-&gt;getOriginalKeys();
    if ($original_keys == 'field_facet_filter')) {
        $query-&gt;keys(NULL);
    }
}


2) If Apache Solr Search module is use

function hook_apachesolr_query_prepare(DrupalSolrQueryInterface $query) {
  ‌‌if ($query-&gt;getParam('q') == 'field_facet_filter') {
    $query-&gt;removeParam('q');
  }
}