You are here

function apachesolr_map_book in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.module \apachesolr_map_book()
  2. 7 apachesolr.module \apachesolr_map_book()

FacetAPI mapping callback.

1 string reference to 'apachesolr_map_book'
apachesolr_common_node_facets in ./apachesolr.module
Helper function returning common facet definitions.

File

./apachesolr.module, line 509
Integration with the Apache Solr search application.

Code

function apachesolr_map_book(array $values) {
  $map = array();
  if (!empty($values)) {
    foreach (book_get_books() as $bid => $book) {
      if (in_array($bid, $values)) {
        $map[$bid] = $book['title'];
      }
    }
  }
  return $map;
}