apachesolr with apachesolr_attachments don't seem to be compatible with the media/file_entity module. I bashed my head for a few hours following directions debugging and testing - trying to get attachments to be indexed - and nothing worked - not even txt files. I wasn't even use the media widget. Soon as media and file entity magically things started to work. My base install has media as part of it and even with all it problems it is still the best solution for media and getting better everyday. I am not sure why it doesn't work but in the next couple months of development I am really going to want it to work.

Any ideas or solutions?

Comments

drh1716’s picture

I'm experiencing the same issue......site has media module installed as well as apachesolr_attachments. When I look under the file entity in the apachesolr index configuration, I see checkboxes for audio, video, image, other. When I check all of the boxes, I'm still unable to get the attachment contents returned in a search. On test sites that do not have media module, under the file entity I am able to click on a bundle called file and attachment searching works.

nick_vh’s picture

We should definitely look into it! I don't have much media experience but I'll try to find and grab some media guys to help me with this

cchamp’s picture

I have the same problem. But the issue is due to the entity_file module, not media.

nick_vh’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tevans’s picture

This still seems to be an issue. On the Apache Solr Default Index tab (/admin/config/search/apachesolr) under configuration, there are two sets of check boxes, 1 for Node and 1 for File. Under File, there are check boxes for each bundle type: Application (multipurpose), Audio, Image, Text, and Video. In my case, I have some PDF files I want to index, so I have only checked "Application (multipurpose)". After saving, the table up top still shows "0 items (0% has been sent to the server)" for Remaining, meaning the queue is empty.

Looking in the database, it appears that the table "apachesolr_index_entities_file" is not getting populated, even after choosing to reindex. Looking at the code, it seems like it might be an issue with the "_apachesolr_attachments_get_all_files" function, which is only returning files uploaded using the file field widget, so any files imported using Media would be excluded. Seems to me like rather than iterating over file field data to retrieve all files, the function should iterate over rows in the "file_managed" table. Does that make sense?

Edit: Forgot to mention that I am using the latest versions of Media, File Entity, Apache Solr, and Apache Solr Attachments.

tevans’s picture

Status: Closed (fixed) » Active

Anyone?

nick_vh’s picture

Could you please make a little list of steps so we can reproduce?

tevans’s picture

Well, there's not really much to it, but here goes:

  1. Install and enable Media and File Entity.
  2. Import files using the Import Files form (/admin/content/file/import).
  3. Run cron to attempt to index files.
David_Rothstein’s picture

Status: Active » Postponed (maintainer needs more info)

It sounds like the files aren't attached to another entity in that case? If so, they won't be indexed - as far as I understand this module only indexes files that are attached to another entity via a file field.

There's a feature request at #1908484: Index files that are not attached to other entities for this, though, and I'm curious if it would be accepted as a patch.

There's also the Apache Solr File module.

ricardoj.m.pinto@gmail.com’s picture

Issue summary: View changes

Greetings everyone!
I'm having the same issue, my setup is:

  • Drupal core 7.27
  • media module 7.x-1.4 branch;
  • file entity 7.x-1.4 (which comes bundled with media module 1.4);
  • Apache Solr search attachments 7.x-1.3;
  • Apache Solr 7.x-1.6

Has anyone tried with media 7.x-2.0 branch and file entity 7.x-2.0-alpha3 ?