The files are indexed, the data is sent to Acquia and the search returns results as expected.
Only problem is, anonymous users don't see the files search results, even though in the permissions page, Anonymous users are not restricted to obtain results either so I'm wondering what i'm missing.
And the other small detail is when I enable facets and files are among the filtered items (in a block), it says default(x) and I was wondering if there's any way to display something else like Files(x) instead ?
and thank you for the module!
Comments
Comment #1
grzesiek_k commentedI do have the same problem. Is there a simple solution for that ?
Thank you,
Greg
Comment #2
robbertnl commentedSame issue, also with authenticated users
Comment #3
nick_vhIf you disable apachesolr node access, this should be resolved. But I currently don't have the bandwidth to research as to why. Could you please do a deep-dive and let me know?
Comment #4
robbertnl commentedI can confirm disable node access helps. I will take a look
Comment #5
grzesiek_k commentedThank you Nick_vh - it's working now !!!
Comment #6
dan3h commentedWe also have the same problem. Indexing PDFs in a file field. They show up in searches *UNLESS* you are not logged in. Then searches for text in the PDF doesn't yield any results. (But the PDF field is not restricted -- even when not logged in, you can view the node containing the PDF, and you can click to open the PDF.)
And disabling "apachesolr node access" fixed the problem.
The issue is not really about being logged in or not. At least in our case, it was about having the "Bypass content access control" permission. My admin user had that, and was able to have the PDF come up in search results. When I granted that permission to anonymous users, they too were able to have the PDFs come up in search results.
But I don't want anonymous users to be entirely exempt from access control. Disabling "apachesolr node access" is better, but still seems like a bit of a hack. Is there anything better available yet?
Comment #7
nick_vhCan someone make a patch for this?
Comment #8
acrosmanThere is a patch that was offered on a similar ticket under the Apache Solr User module: https://drupal.org/node/1665350#comment-7068922. However, it seems to allow too much access. With that patch in place users are able to see snippets for private files they are otherwise unable to open.
Comment #8.0
acrosmanspelling
Comment #9
somebodysysop commentedThis patch to apachesolr_attachments gets us pretty close: https://www.drupal.org/node/1782936#comment-8587995
It will only let users see the file if they have access to the node.
However, if there are further restrictions on the file, say field access permissions, they are ignored. So, theoretically, you could still view results from a private file so long as you have access to the node.
I'm willing to take a stab at it if someone could point me in the right direction. It appears that I would have to use something like hook_field_access().
Comment #10
somebodysysop commentedThe hook to use to process apachesolr search results: hook_apachesolr_process_results()
Comment #11
jamesrward commentedIf anyone can test I would be very interested to hear if this patch resolves the issue.