You are here

facetapi_apachesolr.adapter.inc in Facet API 6

Classes used by the Facet API module.

File

contrib/facetapi_apachesolr/facetapi_apachesolr.adapter.inc
View source
<?php

/**
 * @file
 * Classes used by the Facet API module.
 */

/**
 * Facet API adapter for the Apache Solr Search Integration module.
 */
class FacetapiApachesolrAdapter extends FacetapiAdapter {

  /**
   * Returns a boolean flagging whether $this->_searcher executed a search.
   */
  public function searchExecuted() {
    return apachesolr_has_searched();
  }

  /**
   * Returns the search keys.
   */
  public function getSearchKeys() {
    if (NULL === $this->_keys) {
      if ($query = apachesolr_current_query()) {
        return $query
          ->get_query_basic();
      }
    }
    else {
      return $this->_keys;
    }
    return NULL;
  }

}

Classes

Namesort descending Description
FacetapiApachesolrAdapter Facet API adapter for the Apache Solr Search Integration module.