Apache Solr Integration offers out of the box the ability to select 'content type' as a set of filters which are created in a block. However, in combination with Solr Attachments, these do not include the File attachments type, which is a valid Solr document type, but not a real Drupal content type (not a node type).
There is a need to be able to search only within file attachments (and I note here that Search Files module - for core search - which I can't get to work properly, does offer a separate Attachments tab for this).
It would be very useful if the Apache Solr Attachments module would integrate with the Apache Solr Search Integration filter blocks to offer File attachments as a filter option.
It would be nice if one could also further restrict this filter to file attachments of a specific Drupal content type. For example, one site I am working on has a Document content type, and while it is not the only type to which file attachments can be made, it is the only content type whose file attachments we want to be able to search in.
Glad for feedback and expressions of interest in these features,
Webel
Comments
Comment #1
feuillet commentedLooking for exactly the same feature. Have you found a solution already?
Comment #2
mtrevino commentedDitto here. I have a meetings content type, with attachments for each meeting node. It is indexing the attachments, and i can see them on a full sitewide search, but I got no results for filtering by meeting content type, searching for information in meeting attachments.
I did see this issue that sounds similar, but I'm not familiar with hooks. Is the following link relavent, and can it be done a different way than writing code?
http://drupal.org/node/948732
Comment #3
somebodysysop commentedThe solution suggested here http://drupal.org/node/948732 does not resolve this issue. It is a workaround to change the document type to match the node type. And, it doesn't work.
I'd like to ask again because I can't find a way to do it: Is there a way to create an apache solr filter for file attachments?
Comment #4
somebodysysop commentedFollowing the guidance here: http://www.phase2technology.com/blog/filtering-apache-solr-search-result...
I am now able to create a filter using hook_apachesolr_modify_query that will return results for both nodes and file attachments.
Comment #5
avpadernoI am closing this issue as it's for a Drupal version that isn't supported.