diff --git a/apachesolr.module b/apachesolr.module
index ddc096a..a5f0389 100644
--- a/apachesolr.module
+++ b/apachesolr.module
@@ -222,6 +222,7 @@ function apachesolr_init() {
  */
 function apachesolr_facetapi_searcher_info() {
   $info = array();
+  //TODO: is it needed to return all of them here?
   foreach (apachesolr_load_all_environments() as $id => $environment) {
     $info['apachesolr@' . $id] = array(
       'label' => t('Apache Solr environment: @environment', array('@environment' => $environment['name'])),
@@ -1219,8 +1220,86 @@ function apachesolr_load_all_environments() {
     cache_set('apachesolr:environments', $environments, 'cache_apachesolr');
   }
   return $environments;
+}
+
+ /**
+ * Function that loads all the search types
+ *
+ * @return $search_types
+ */
+function apachesolr_load_all_search_types() {
+  $search_types = &drupal_static(__FUNCTION__);
+
+  if (isset($search_types)) {
+    return $search_types;
+  }
+  // Use cache_get to avoid DB when using memcache, etc.
+  $cache = cache_get('apachesolr:search_types', 'cache_apachesolr');
+  if (isset($cache->data)) {
+    $search_types = $cache->data;
+  }
+  else {
+    $search_types = array(
+        'tid' => array(
+          'name' => apachesolr_field_name_map('tid'),
+          'default menu' => 'taxonomy/term/%',
+          'title callback' => 'apachesolr_get_taxonomy_term_title',
+        ),
+        'is_uid' => array(
+          'name' => apachesolr_field_name_map('is_uid'),
+          'default menu' => 'search/user/%user',
+          'title callback' => 'apachesolr_get_user_title',
+        ),
+        'bundle' => array(
+          'name' => apachesolr_field_name_map('bundle'),
+          'default menu' => 'search/type/%',
+          'title callback' => 'apachesolr_get_value_title',
+        ),
+        'ss_language' => array(
+          'name' => apachesolr_field_name_map('ss_language'),
+          'default menu' => 'search/language/%',
+          'title callback' => 'apachesolr_get_value_title',
+        ),
+    );
+    module_invoke_all('apachesolr_search_types', $search_types);
+    cache_set('apachesolr:search_types', $search_types, 'cache_apachesolr');
+  }
+  return $search_types;
+}
+
+function apachesolr_get_taxonomy_term_title($search_page_id = null, $value = null) {
+   $page_title = 'Search results for %value';
+   if (isset($value) && isset($search_page_id)) {
+     $search_page = apachesolr_search_page_load($search_page_id);
+     $page_title = str_replace('%value', '@value', $search_page->page_title);
+     $term = taxonomy_term_load($value);
+     $title = $term->name;
+   }
+   return t($page_title, array('@value' => $title));
+}
 
- }
+function apachesolr_get_user_title($search_page_id = null, $value = null) {
+  //add dynamic title posibility
+  $page_title = 'Search results for %value';
+  if (isset($value) && isset($search_page_id)) {
+    $search_page = apachesolr_search_page_load($search_page_id);
+    $page_title = str_replace('%value', '@value', $search_page->page_title);
+    $user = user_load($value);
+    $title = $user->name;
+  }
+  return t($page_title, array('@value' => $title));
+}
+
+function apachesolr_get_value_title($search_page_id = null, $value = null) {
+  //add dynamic title posibility
+  $page_title = 'Search results for %value';
+  if (isset($value)  && isset($search_page_id)) {
+    $search_page = apachesolr_search_page_load($search_page_id);
+    $page_title = str_replace('%value', '@value', $search_page->page_title);
+    $title = $value;
+  }
+  return t($page_title, array('@value' => $title));
+}
 
 /**
  * Function that loads an environment
@@ -1664,6 +1743,10 @@ function apachesolr_field_name_map($field_name) {
       'tags_inline' => t('Body text in inline tags like EM or STRONG'),
       'tags_a' => t('Body text inside links (A tags)'),
       'tid' => t('Taxonomy term IDs'),
+      'is_uid' => t('User IDs'),
+      'bundle' => t('Content type names eg. article'),
+      'entity_type' => t('Entity type names eg. node'),
+      'ss_language' => t('Language type eg. en or und (undefinded)'),
     );
     if (module_exists('taxonomy')) {
       foreach (taxonomy_get_vocabularies() as $vocab) {
diff --git a/apachesolr_search.admin.inc b/apachesolr_search.admin.inc
index 4c8daae..fcd404c 100644
--- a/apachesolr_search.admin.inc
+++ b/apachesolr_search.admin.inc
@@ -110,6 +110,32 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
     '#default_value' => !empty($search_page->label) ? $search_page->label : '',
   );
 
+  $form['search_page'] = array(
+      '#type' => 'value',
+      '#value' => $search_page,
+  );
+
+
+
+  $environments = apachesolr_load_all_environments();
+  $options = array('' => t('<Disabled>'));
+  foreach ($environments as $id => $environment) {
+    $options[$id] = $environment['name'];
+  }
+  // Validate the env_id.
+  if (!empty($search_page->env_id) && !apachesolr_environment_load($search_page->env_id)) {
+    $search_page->env_id = '';
+  }
+
+  $form['info']['env_id'] = array(
+    '#title' => t('Search environment'),
+    '#type' => 'select',
+    '#options' => $options,
+    '#default_value' => !empty($search_page->env_id) ? $search_page->env_id : '',
+    '#description' => t('The environment that is used by this search page. If no environment is selected, this page will be disabled.'),
+    '#weight' => -30,
+  );
+
   $form['page_id'] = array(
     '#type' => 'machine_name',
     '#maxlength' => 32,
@@ -133,25 +159,56 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
     '#default_value' => !empty($search_page->description) ? $search_page->description : '',
   );
 
-  $form['info']['search_path'] = array(
+  $form['info']['setup'] = array(
+    '#title' => t('Dynamic Search Options'),
+    '#type' => 'fieldset',
+    '#collapsible' => TRUE,
+    '#prefix' => '<div id="dynamic-search-page">',
+    '#suffix' => '</div>',
+  );
+
+  $search_types = apachesolr_load_all_search_types();
+  $options = array('custom' => t('Custom Field'));
+  foreach ($search_types as $id => $search_type) {
+    $options[$id] = $search_type['name'];
+  }
+
+  $form['info']['setup']['search_type'] = array(
+    '#title' => t('Search Type'),
+    '#type' => 'select',
+    '#options' => $options,
+    '#default_value' => !empty($search_page->settings['apachesolr_search_search_type']) ? $search_page->settings['apachesolr_search_search_type'] : '',
+    '#description' => t('Use this only when using a dynamic filter in the search path.
+      Example you would selecting Taxonomy Term if you search needs a dynamic search path on TIDs (search/taxonomy/%).'),
+    '#weight' => -30,
+    '#ajax' => array(
+      'callback' => 'apachesolr_search_ajax_search_page_default',
+      'wrapper' => 'dynamic-search-page',
+      'method' => 'replace',
+    ),
+  );
+
+  // Token element validate is added to validate the specific
+  // tokens that are allowed
+  $form['info']['setup']['search_path'] = array(
     '#title' => t('Path'),
     '#type' => 'textfield',
     '#required' => TRUE,
     '#maxlength' => 255,
-    '#description' => t('For example: search/my-search-page. Search keywords will appear at the end of the path.'),
+    '#description' => t('For example: search/my-search-page. Search keywords will appear at the end of the path. You can use % to make the search page dynamic.'),
     '#default_value' => !empty($search_page->search_path) ? $search_page->search_path : '',
   );
 
-  $form['info']['filters'] = array(
-    '#title' => t('Default filters'),
+  $form['info']['setup']['filters'] = array(
+    '#title' => t('Custom filters'),
     '#type' => 'textfield',
     '#required' => FALSE,
     '#maxlength' => 255,
-    '#description' => t('A comma-separated list of lucene filter queries to apply by default. E.g. "bundle:blog, is_uid:(1 OR 2 OR 3)"'),
+    '#description' => t('A comma-separated list of lucene filter queries to apply by default. E.g. "bundle:blog, is_uid:(1 OR 2 OR %). % will be replaced by the value of % in the url"'),
     '#default_value' => !empty($search_page->settings['fq'])  ? implode(', ', $search_page->settings['fq']) : '',
   );
 
-  $form['info']['page_title'] = array(
+  $form['info']['setup']['page_title'] = array(
     '#title' => t('Title'),
     '#type' => 'textfield',
     '#required' => TRUE,
@@ -159,35 +216,42 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
     '#description' => '',
     '#default_value' => !empty($search_page->page_title) ? $search_page->page_title : '',
   );
+  $form['info']['advanced'] = array(
+    '#title' => t('Advanced Search Page Options'),
+    '#type' => 'fieldset',
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+
+  // Results per page per search page
+  $default_value = isset($search_page->settings['apachesolr_search_per_page']) ? $search_page->settings['apachesolr_search_per_page'] : TRUE;
+  $form['info']['advanced']['apachesolr_search_per_page'] = array(
+    '#type' => 'select',
+    '#title' => t('Results per page'),
+    '#description' => t('Select how many items will be displayed on one page of the search result.'),
+    '#options' => drupal_map_assoc(array(5, 10, 20, 30, 40, 50, 60, 80, 100)),
+    '#default_value' => 10,
+  );
+
+  // Enable/disable spellcheck on pages
+  $default_value = isset($search_page->settings['apachesolr_search_spellcheck']) ? $search_page->settings['apachesolr_search_spellcheck'] : TRUE;
+  $form['info']['advanced']['apachesolr_search_spellcheck'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable spell check'),
+    '#description' => t('Display "Did you mean … ?" above search results.'),
+    '#default_value' => $default_value,
+  );
+
+  //@todo : Add display mode to it? Or does something like Display suite handle that for us
 
   // Sets the descriptions and button text.
   $form['label']['#description'] = t('The human-readable name of the search page configuration.');
   $form['page_id']['#description'] = t('A unique machine-readable identifier for the search page configuration. It must only contain lowercase letters, numbers, and underscores.');
   $form['info']['description']['#description'] = t('The description of the search page configuration.');
 
-  $environments = apachesolr_load_all_environments();
-
-  $options = array('' => t('<Disabled>'));
-  foreach ($environments as $id => $environment) {
-    $options[$id] = $environment['name'];
-  }
-  // Validate the env_id.
-  if (!empty($search_page->env_id) && !apachesolr_environment_load($search_page->env_id)) {
-    $search_page->env_id = '';
-  }
-
-  $form['info']['env_id'] = array(
-    '#title' => t('Search environment'),
-    '#type' => 'select',
-    '#options' => $options,
-    '#default_value' => !empty($search_page->env_id) ? $search_page->env_id : '',
-    '#description' => t('The environment that is used by this search page. If no environment is selected, this page will be disabled.'),
-    '#weight' => -30,
-  );
-
   // Use the main search page setting as the default for new pages.
   $default_value = isset($search_page->settings['apachesolr_search_browse']) ? $search_page->settings['apachesolr_search_browse'] : variable_get('apachesolr_search_browse', 'browse');
-  $form['info']['apachesolr_search_browse'] = _apachesolr_search_browse_form($default_value);
+  $form['info']['advanced']['apachesolr_search_browse'] = _apachesolr_search_browse_form($default_value);
 
   $form['actions'] = array(
     '#type' => 'actions',
@@ -210,6 +274,35 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
   return $form;
 }
 
+/**
+ * Callback element needs only select the portion of the form to be updated.
+ * Since #ajax['callback'] return can be HTML or a renderable array (or an
+ * array of commands), we can just return a piece of the form.
+ */
+function apachesolr_search_ajax_search_page_default($form, $form_state, $search_page = NULL) {
+
+  $search_page = $form_state['values']['search_page'];
+  $search_types = apachesolr_load_all_search_types();
+
+  // Helping with sensible defaults for the search path
+  $default_search_path = '';
+
+  if (!empty($form_state['values']['search_type']) && $form_state['values']['search_type'] != 'custom') {
+    $default_search_path = $search_types[$form_state['values']['search_type']]['default menu'];
+    $form['info']['setup']['search_path']['#value'] = $default_search_path;
+  }
+
+  // Helping with sensible defaults for the search title
+  $default_search_title = '';
+
+  if (!empty($form_state['values']['page_title']) && $form_state['values']['search_type'] != 'custom') {
+    $default_search_title_callback = $search_types[$form_state['values']['search_type']]['title callback'];
+    $default_search_title = $default_search_title_callback();
+    $form['info']['setup']['page_title']['#value'] = $default_search_title;
+  }
+  return $form['info']['setup'];
+}
+
 function apachesolr_search_page_settings_form_validate($form, &$form_state) {
   // Performs basic validation of the menu path.
   if (url_is_external($form_state['values']['search_path'])) {
@@ -235,8 +328,10 @@ function apachesolr_search_page_settings_form_submit($form, &$form_state) {
       }
     }
   }
-
+  $settings['apachesolr_search_search_type'] = $form_state['values']['search_type'];
+  $settings['apachesolr_search_per_page'] = $form_state['values']['apachesolr_search_per_page'];
   $settings['apachesolr_search_browse'] = $form_state['values']['apachesolr_search_browse'];
+  $settings['apachesolr_search_spellcheck'] = $form_state['values']['apachesolr_search_spellcheck'];
 
   db_merge('apachesolr_search_page')
     ->key(array('page_id' => $form_state['values']['page_id']))
diff --git a/apachesolr_search.module b/apachesolr_search.module
index 0466753..2bc862f 100644
--- a/apachesolr_search.module
+++ b/apachesolr_search.module
@@ -81,12 +81,15 @@ function apachesolr_search_menu() {
     'type'             => MENU_LOCAL_TASK,
     'file'             => 'apachesolr_search.admin.inc',
   );
+  return $items;
+}
 
+function apachesolr_search_menu_alter(&$items) {
   try {
     // Gets search pages directly from the index.
     // @todo Honor "enabled" settings?
     $result = db_select('apachesolr_search_page', 's')
-      ->fields('s', array('page_id', 'search_path', 'page_title', 'env_id'))
+      ->fields('s', array('page_id'))
       ->condition('env_id', '', '<>')
       ->execute();
   }
@@ -97,46 +100,68 @@ function apachesolr_search_menu() {
 
   // Gets default search information.
   $default_info = search_get_default_module_info();
+  $search_types = apachesolr_load_all_search_types();
 
   // Iterates over search pages, builds menu items.
   foreach ($result as $record) {
+    $search_page = apachesolr_search_page_load($record->page_id);
     // Validate the environemnt ID in case of import or missed deletion.
-    $environment = apachesolr_environment_load($record->env_id);
+    $environment = apachesolr_environment_load($search_page->env_id);
     if (!$environment) {
       continue;
     }
+
     // Parses search path into it's various parts, builds menu items dependent
     // on whether %keys is in the path.
-    $parts = explode('/', $record->search_path);
+    $parts = explode('/', $search_page->search_path);
     $keys_pos = count($parts);
     // Tests whether we are simulating a core search tab.
     $core_search = ($parts[0] == 'search');
+    $taxonomy_search = ($parts[0] == 'taxonomy');
+    $position = array_search('%', $parts);
 
-    $items[$record->search_path] = array(
-      'title' => $record->page_title,
+    // Replace possible tokens [term:tid], [node:nid], [user:uid] with their
+    // menu-specific variant
+    $items[$search_page->search_path] = array(
+      'title' => 'Search Results',
       'page callback' => 'apachesolr_search_user_defined_search_page',
-      'page arguments' => array($record->page_id, ''),
+      'page arguments' => array($search_page->page_id, '', $position),
       'access arguments' => array('search content'),
-      'type' => ($core_search) ? MENU_LOCAL_TASK : MENU_SUGGESTED_ITEM,
+      'type' => ($core_search || $taxonomy_search) ? MENU_LOCAL_TASK : MENU_SUGGESTED_ITEM,
       'file' => 'apachesolr_search.pages.inc',
+      'file path' => drupal_get_path('module', 'apachesolr_search'),
     );
 
-    $items[$record->search_path . '/%menu_tail'] = array(
-      'title' => $record->page_title,
+    $items[$search_page->search_path . '/%menu_tail'] = array(
+      'title' => 'Search Results',
       'load arguments' => array('%map', '%index'),
       'page callback' => 'apachesolr_search_user_defined_search_page',
-      'page arguments' => array($record->page_id, $keys_pos),
+      'page arguments' => array($search_page->page_id, $keys_pos, $position),
       'access arguments' => array('search content'),
       'type' => MENU_LOCAL_TASK,
       'file' => 'apachesolr_search.pages.inc',
+      'file path' => drupal_get_path('module', 'apachesolr_search'),
     );
+
+    // If title has a certain callback for the selected type we use it
+    if ((isset($search_types[$search_page->settings['apachesolr_search_search_type']]['title callback'])) && (NULL !== $position)) {
+      $title_callback = $search_types[$search_page->settings['apachesolr_search_search_type']]['title callback'];
+      $items[$search_page->search_path]['title callback'] = $title_callback;
+      $items[$search_page->search_path]['title arguments'] = array($search_page->page_id, $position);
+      $items[$search_page->search_path . '/%menu_tail']['title callback'] = $title_callback;
+      $items[$search_page->search_path . '/%menu_tail']['title arguments'] = array($search_page->page_id, $position);
+    }
+
     if ($core_search) {
-      $items[$record->search_path . '/%menu_tail']['tab_root'] = 'search/' . $default_info['path'] . '/%';
-      $items[$record->search_path . '/%menu_tail']['tab_parent'] = 'search/' . $default_info['path'];
+      $items[$search_page->search_path . '/%menu_tail']['tab_root'] = 'search/' . $default_info['path'] . '/%';
+      $items[$search_page->search_path . '/%menu_tail']['tab_parent'] = 'search/' . $default_info['path'];
     }
-  }
 
-  return $items;
+    if($taxonomy_search) {
+      unset($items['taxonomy/term/%taxonomy_term']);
+      unset($items['taxonomy/term/%taxonomy_term/view']);
+    }
+  }
 }
 
 function apachesolr_search_page_load($page_id) {
@@ -144,7 +169,7 @@ function apachesolr_search_page_load($page_id) {
   if ($page) {
     $page->settings = unserialize($page->settings);
   }
-  return $page; 
+  return $page;
 }
 
 /**
@@ -369,6 +394,7 @@ function apachesolr_search_run($name, array $params = array(), $solrsort = '', $
   $query = apachesolr_drupal_query($name, $params, $solrsort, $base_path, $solr);
 
   apachesolr_search_basic_params($query);
+
   apachesolr_search_add_boost_params($query);
   if ($query->getParam('q')) {
     apachesolr_search_highlighting_params($query);
@@ -656,7 +682,7 @@ function apachesolr_search_node_result($doc, &$result, &$extra) {
 }
 
 /**
- * Returns whether a search page exists. 
+ * Returns whether a search page exists.
  */
 function apachesolr_search_page_exists($search_page_id) {
   return db_query('SELECT 1 FROM {apachesolr_search_page} WHERE page_id = :page_id', array(':page_id' => $search_page_id))->fetchField();
diff --git a/apachesolr_search.pages.inc b/apachesolr_search.pages.inc
index 4929287..c59db2d 100644
--- a/apachesolr_search.pages.inc
+++ b/apachesolr_search.pages.inc
@@ -1,18 +1,43 @@
 <?php
 
-/**   
+/**
  * @file
  *   Provides the page callback for user defined search pages.
- */ 
+ */
 
 /**
  * Returns search results on user defined search pages.
  */
-function apachesolr_search_user_defined_search_page($page_id, $keys = '') {
+function apachesolr_search_user_defined_search_page($page_id, $keys = '', $value) {
+
+  // This logic looks for any supported token in the menu item and matches it
+  // with the menu object loader
+  // Currently the logic supports unlimited depth with the restriction that
+  // the software becomes slower depending on how manu objects are added
+  // as tokens
+  // TODO: Optimize this logic bu using regular expressions or existing functionality
   $search_page = apachesolr_search_page_load($page_id);
-  $build = array();
+  $search_type = $search_page->settings['apachesolr_search_search_type'];
+
+  //replace dynamic path with current path
+  $search_page->search_path = str_replace('%', $value, $search_page->search_path);
+
+
+  //manual filters
   $filters = isset($search_page->settings['fq']) ? $search_page->settings['fq'] : array();
+  //if the manual filter has a % in it, replace it with $value
+  $filters = str_replace('%', $value, $filters);
+
+  //replace the path with the value
+  $search_page->search_path = str_replace('%', $value, $search_page->search_path);
+
+  if (!empty($search_type) && !empty($value) && $search_type != 'custom') {
+    $filters[] = $search_type. ':' .$value;
+  }
+
+  //set our sorting
   $solrsort = isset($_GET['solrsort']) ? $_GET['solrsort'] : '';
+
   // We may also have filters added by facet API module. The 'f'
   // is determined by constant FacetapiAdapter::FILTER_KEY. Hard
   // coded here to avoid extra class loading.
@@ -23,16 +48,21 @@ function apachesolr_search_user_defined_search_page($page_id, $keys = '') {
     }
   }
 
+  //what to do when we have an initial empty search
   $empty_search_behavior = $search_page->settings['apachesolr_search_browse'];
 
+  //initiate our build array
+  $build = array();
   try {
     $solr = apachesolr_get_solr($search_page->env_id);
+
     // Adds the search form to the page.
     $build['search_form'] = drupal_get_form('apachesolr_search_user_defined_search_form', $search_page, $keys);
 
     if (!$keys && empty($conditions) && ($empty_search_behavior == 'browse' || $empty_search_behavior == 'blocks')) {
       // Pass empty search behavior as string on to apachesolr_search_search_page()
       $results = apachesolr_search_run('apachesolr', array('fq' => $filters), '', $search_page->search_path, 0, $solr);
+
       if ($empty_search_behavior == 'browse') {
         // Hide sidebar blocks for content-area browsing instead.
         apachesolr_suppress_blocks(TRUE);
@@ -76,7 +106,7 @@ function apachesolr_search_user_defined_search_form($form, &$form_state, $search
 
   $form['basic']['keys'] = array(
     '#type' => 'textfield',
-    '#title' => t('Enter terms'), 
+    '#title' => t('Enter terms'),
     '#default_value' => $keys,
     '#size' => 20,
     '#maxlength' => 255,
@@ -94,9 +124,8 @@ function apachesolr_search_user_defined_search_form($form, &$form_state, $search
  * Processes apachesolr_search_user_defined_search_form submissions.
  */
 function apachesolr_search_user_defined_search_form_submit(&$form, &$form_state) {
-  $page = $form['#search_page'];
-
-  $redirect = $page->search_path;
+  $search_page = $form['#search_page'];
+  $redirect = $search_page->search_path;
   if (strlen($form_state['values']['keys'])) {
     $redirect .= '/' . $form_state['values']['keys'];
   }
diff --git a/contrib/apachesolr_taxonomy.info b/contrib/apachesolr_taxonomy.info
deleted file mode 100644
index a7bab24..0000000
--- a/contrib/apachesolr_taxonomy.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Apache Solr Taxonomy
-description = Override handling of taxonomy/term/X links using Solr search. Deprecated in favor of Views integration.
-dependencies[] = taxonomy
-dependencies[] = apachesolr_search
-package = Search Toolkit
-core = 7.x
-
-files[] = apachesolr_taxonomy.module
diff --git a/contrib/apachesolr_taxonomy.module b/contrib/apachesolr_taxonomy.module
deleted file mode 100644
index 2dd4ef7..0000000
--- a/contrib/apachesolr_taxonomy.module
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * @file
- *   Override handling of taxonomy/term/X links.
- *   Deprecated in favor of Views integration.
- */
-
- /**
- * Implements hook_menu_alter().
- */
-function apachesolr_taxonomy_menu_alter(&$menu) {
-  if (isset($menu['taxonomy/term/%taxonomy_term'])) {
-    $menu['taxonomy/term/%taxonomy_term']['page callback'] = 'apachesolr_taxonomy_term_page';
-    $menu['taxonomy/term/%taxonomy_term']['file path'] = NULL;
-    $menu['taxonomy/term/%taxonomy_term']['file'] = NULL;
-  }
-}
-
-/**
- * Overrides taxonomy/term/X links
- */
-//function apachesolr_search_taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
-function apachesolr_taxonomy_term_page($term) {
-  // Build breadcrumb based on the hierarchy of the term.
-  $current = clone $term;
-  // @todo This overrides any other possible breadcrumb and is a pure hard-coded
-  // presumption. Make this behavior configurable per vocabulary or term.
-  $breadcrumb = array();
-  while ($parents = taxonomy_get_parents($current->tid)) {
-    $current = array_shift($parents);
-    $breadcrumb[] = l($current->name, 'taxonomy/term/' . $current->tid);
-  }
-  $breadcrumb[] = l(t('Home'), NULL);
-  $breadcrumb = array_reverse($breadcrumb);
-  drupal_set_breadcrumb($breadcrumb);
-  drupal_add_feed(url('taxonomy/term/' . $term->tid . '/feed'), 'RSS - ' . $term->name);
-
-  $build = array();
-  // Add term heading if the term has a description
-  if (!empty($term->description)) {
-    $build['term_heading'] = array(
-      '#prefix' => '<div class="term-listing-heading">',
-      '#suffix' => '</div>',
-      'term' => taxonomy_term_view($term, 'full'),
-    );
-  }
-
-  if (user_access('search content')) {
-    $_GET['retain-filters'] = 1; // Encourages the user to keep the taxonomy filter on next search.
-    $results = apachesolr_search_run('', array('tid:' . $term->tid), variable_get('apachesolr_search_taxonomy_sort', 'ds_created desc'), 'search/apachesolr_search', isset($_GET['page']) ? $_GET['page'] : 0);
-
-    if ($results) {
-      foreach ($results as $entry) {
-        $output[] = $entry;
-      }
-      $build['content'] = array(
-        '#markup' => theme('search_results', array(
-          'results' => $output,
-          'module' => 'apachesolr_search',
-        )),
-      );
-      return $build;
-    }
-  }
-
-  $build['no_content'] = array(
-    '#prefix' => '<p>',
-    '#markup' => t('There is currently no content classified with this term.'),
-    '#suffix' => '</p>',
-  );
-  return $build;
-}
-
diff --git a/plugins/facetapi/adapter.inc b/plugins/facetapi/adapter.inc
index 59ef80f..0bf3a3c 100644
--- a/plugins/facetapi/adapter.inc
+++ b/plugins/facetapi/adapter.inc
@@ -73,6 +73,33 @@ class ApacheSolrFacetapiAdapter extends FacetapiAdapter {
   }
 
   /**
+   * Returns the search path.
+   *
+   * @return string
+   *   A string containing the search path.
+   *
+   * @todo D8 should provide an API function for this.
+   */
+  public function getSearchPath() {
+    $query = apachesolr_current_query();
+    if (NULL === $this->searchPath && NULL === $query->getPath()) {
+      if ($path = module_invoke($this->info['module'] . '_search', 'search_info')) {
+        $this->searchPath = 'search/' . $path['path'];
+        if (!isset($_GET['keys']) && ($keys = $this->getSearchKeys())) {
+          $this->searchPath .= '/' . $keys;
+        }
+      }
+    }
+    if(NULL === $query->getPath()) {
+       return $this->searchPath;
+    }
+    else {
+      return $query->getPath();
+    }
+
+  }
+
+  /**
    * Returns the nmber of total results found for the current search.
    */
   public function getResultCount() {
@@ -88,4 +115,5 @@ class ApacheSolrFacetapiAdapter extends FacetapiAdapter {
   public function settingsForm(&$form, &$form_state) {
     $form['#validate'][] = 'apachesolr_facet_form_validate';
   }
+
 }
