You are here

function apachesolr_search_basic_params in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_basic_params()
  2. 5.2 apachesolr_search.module \apachesolr_search_basic_params()
  3. 6.3 apachesolr_search.module \apachesolr_search_basic_params()
  4. 6 apachesolr_search.module \apachesolr_search_basic_params()
  5. 6.2 apachesolr_search.module \apachesolr_search_basic_params()
1 call to apachesolr_search_basic_params()
apachesolr_search_run in ./apachesolr_search.module
Execute a search results based on keyword, filter, and sort strings.

File

./apachesolr_search.module, line 1147
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_basic_params(DrupalSolrQueryInterface $query = NULL) {
  $params = array(
    'fl' => array(
      'id',
      'entity_id',
      'entity_type',
      'bundle',
      'bundle_name',
      'label',
      'ss_language',
      'is_comment_count',
      'ds_created',
      'ds_changed',
      'score',
      'path',
      'url',
      'is_uid',
      'tos_name',
    ),
    'mm' => 1,
    'rows' => 10,
    'pf' => 'content^2.0',
    'ps' => 15,
    'hl' => 'true',
    'hl.fl' => 'content',
    'hl.snippets' => 3,
    'hl.mergeContigious' => 'true',
    'f.content.hl.alternateField' => 'teaser',
    'f.content.hl.maxAlternateFieldLength' => 256,
  );
  if ($query) {
    $query
      ->addParams($params);
  }
  return $params;
}