I am building a drupal site using Views, search API module and user-points module.

I created the "database server", and indexed many fields of nodes.

I created a search page using views and the search API, that present content (image, title etc.) In addition, I want to add to every content in this search view the name of the author that wrote it, his author picture.

I add the Indexed Content: Author relationship. Unfortunately, I can't find a way to add the author picture and the current total point to my view.

Can somebody advice how to do that?


3 Answers 3


I have not tried any of the following before, these are result of googling, so might not work.

I see two ways, hope any one helps you.

  1. Solution might be as simple as using Apache Solr Image module, but not sure if it will work with user image.

  2. The second needs custom coding, which will basically tell apache solr to index the image field uri and then add the uri field in your views and finally theme it as image using a custom template, Refer this for sample code.


So what i did was that i included the "Rendered user" field as part of the fields to be displayed in my view. In the Rendered user view mode settings, i choose "User account".

Finally i went to the "Manage display" tab of the Account settings to remove unwanted fields.


We do it something like

function MY_MODULE_entity_property_info_alter(&$info) {
  $info['user']['properties']['picture'] = array(
   'label' => t('User Picture'),
   'type' => "file",
   'description' => t("The user profile picture."),
  return $info;

This way the user picture field would be available under Fields of Search Index.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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