0

I am using acquia search on D7 site. By default I get all the search results as Title, Teaser with search info at the bottom. I am trying to alter this results to add some of the field data.

Eg: Content type is a product and there is a Date of arrival field and Stock availability field for all the Product node.

Now how can I add these two fields as part of every result on search results page?

0

You can use Apache Solr Views module. Add title, date and any other fields you want.

| improve this answer | |
  • I did install this module.. and now I am lost. Because views is not providing any results for any of the fields. – AnAnD Jul 9 '13 at 6:47
  • Are you sure the search index works? – heshanlk Jul 9 '13 at 12:33
  • Yes, I have indexed all the products. And the normal search is working fine with facets, etc. – AnAnD Jul 9 '13 at 12:51
  • I get an error: Notice: Undefined property: apachesolr_views_query::$group_operator in apachesolr_views_query->build() (line 80 of /var/www/html/root/sites/all/modules/apachesolr_views/apachesolr_views_query.inc). – AnAnD Jul 10 '13 at 9:01
1

You can use hook_apachesolr_query_alter($query) to alter your results variable, if you're using Apache solr views and this error

Notice: Undefined property: apachesolr_views_query::$group_operator in apachesolr_views_query->build() (line 80 of /var/www/html/root/sites/all/modules/apachesolr_views/apachesolr_views_query.inc‌​).

this means that you didn't use filters in your view.

| 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.