1

I created an index that indexes taxonomy terms. I indexed the term name + field_skill type text. The current result shows only the term id + score.

I want to show also the field_skill.

 $term = 'drupal';

 // Select an index.
 $index = search_api_index_load("terms");
 $query = new SearchApiQuery($index);


 // Conditions.
 $query->condition('name', $term, '=');
 // $query->condition('language', $language->language, '=');

 // Fetch results.
 $results = $query->execute()['results'];
 dpm($results); // returns only ids and score I want to return other indexed fields
  • Which backend are you using? Solr? Db? Other? – arrubiu Nov 5 '14 at 15:35
  • Apache Solr Server – sel_space Nov 5 '14 at 15:37
3

If you are using Solr, on server configuration (admin/config/search/search_api/server/YOUR_SERVER_NAME/edit), under "Advanced" fieldset, you should enable the "Retrieve result data from Solr" option:

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.