You are here

function apachesolr_mlt_get_fields in Apache Solr Search 5

Same name and namespace in other branches
  1. 5.2 apachesolr.admin.inc \apachesolr_mlt_get_fields()
  2. 6 apachesolr.admin.inc \apachesolr_mlt_get_fields()
  3. 6.2 apachesolr.admin.inc \apachesolr_mlt_get_fields()

function apachesolr_mlt_get_fields() A list of field names used on the settings form.

Return value

array An array containing a the fields in the solr instance.

1 call to apachesolr_mlt_get_fields()
apachesolr_mlt_block_form in contrib/apachesolr_mlt/apachesolr_mlt.module
function apachesolr_mlt_block_form() Allows users to create and edit moreLikeThis Blocks.

File

contrib/apachesolr_mlt/apachesolr_mlt.module, line 268

Code

function apachesolr_mlt_get_fields() {
  include_once drupal_get_path('module', 'apachesolr') . '/Solr_Base_Query.php';
  $fields = Solr_Base_Query::get_fields_in_index();
  $rows = array();
  foreach ($fields as $field_name => $field) {
    if ($field->schema[4] == 'V') {
      $rows[$field_name] = $field_name;
    }
  }
  return $rows;
}