0

Is there a way to search for files attached to taxonomy terms ?

I mean I have a vocabulary, with some terms. Each term have some files attached (Field) (Ex: example.pdf, Image.png).

I want my search to show that files, for example::

Search result:

--- Example.pdf

--- Image.png

Is that possible ? I don't want to search file contents, I just need filenames and path's shown on the search page.

Thanks and sorry for my english.

1 Answer 1

0

You can index taxonomy terms with this module: https://drupal.org/project/apachesolr_term

There is a hook that allows you to specify a custom field for the solr index: hook_apachesolr_index_document_build_' . [entity type]

Then you can add this field to the solr query by using: hook_apachesolr_query_prepare

There is a more detailed article on how to do this here: http://rapiddg.com/blog/adding-customized-fields-apache-solr-index-drupal

Your Answer

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