By sel_space


2014-11-05 14:15:08 8 Comments

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

1 comments

@arrubiu 2014-11-05 15:40:28

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

Related Questions

Sponsored Content

1 Answered Questions

Adding indexed field to Search API query in code

  • 2014-09-16 17:57:45
  • J. Reynolds
  • 1858 View
  • 3 Score
  • 1 Answer
  • Tags:   search

1 Answered Questions

How do I get only node IDs from the search results?

  • 2017-07-02 12:25:50
  • Chris
  • 317 View
  • 1 Score
  • 1 Answer
  • Tags:   7 search

2 Answered Questions

[SOLVED] Show only terms that have been used?

1 Answered Questions

[SOLVED] solr search in multiple fields

  • 2014-11-20 10:03:19
  • Orchid
  • 1719 View
  • 1 Score
  • 1 Answer
  • Tags:   7 search

1 Answered Questions

1 Answered Questions

[SOLVED] Search API Solr Autocomplete no results when more than x Nodes indexed

1 Answered Questions

EntityFieldQuery return nodes with all terms

  • 2016-04-01 23:18:04
  • user10553
  • 74 View
  • 0 Score
  • 1 Answer
  • Tags:   7 database

Sponsored Content