• We’re using Relevanssi Free. Searches do not seem to include attachments of any type of Image, however other mime-types (PDFs, DOCs,) seem to work fine.

    For what it’s worth, we’ve added the ability to put Post_tags on attachments so it’s the odd case where one can find the image attachments via Tag, but -not- through a straight search /s.

    It may be unrelated, but we’re also using Filebird Pro. I hesitate to de-activate it to test because I’ve been warned that doing so can trash all the virtual folders, which we’re not anxious to do.

    FWIW, we are -not- using JetPack or any other search plugs, however we are using Yoast.

    We tried switching to the 2023 theme and that also misbehaves, so we assume it’s not the theme.

    The Admin Search works fine. But of course that only shows the attachments apart from the other post types that should be returned together.

    I tried your debugging page and the results from the last step (modifying lib/search) omit the images. Here is the SQL in the first step for “Ray Bishop”. This returns 2 results, when it should return -3- (the image tagged as Ray Bishop is missing.)

    string(525) “SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 3 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 3 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 0.5 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf FROM wp_relevanssi AS relevanssi WHERE (relevanssi.term LIKE ‘bishop%’ OR relevanssi.term_reverse LIKE CONCAT(REVERSE(‘bishop’), ‘%’)) AND relevanssi.doc NOT IN (87,314,6207) ORDER BY tf DESC LIMIT 500”

    Any ideas?

    • This topic was modified 1 year, 7 months ago by suntower. Reason: more detail on debugging we've tried so far
    • This topic was modified 1 year, 7 months ago by suntower.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 27 total)
  • Plugin Author Mikko Saari

    (@msaari)

    So you’re saying the Relevanssi admin search returns the images? If you check the images with the indexing debugger, are all the correct information (titles and tags) included in the index?

    There are two places where this can fail: either the images are not indexed correctly, or the search is excluding them.

    What are you using for the advanced search options? Is it something custom-built? How are the “include_pdfs”, “include_videos”, “include_audio” parameters done?

    Could you please enable the debugging mode from the Relevanssi debugging settings?

    Thread Starter suntower

    (@suntower)

    Thanks for the quick reply.

    1. I have enabled Debug Mode in the Debugging tab. Now what?
    2. FWIW, in the top half of the Debugging tab, I enter the attachment ID and it returns what looks normal. But when I enter the same number in the lower half “how does the post look like”, the results are empty.
    3. I have -no- relevanssi filters or code in my theme. I just checked the box to index attachments. As I said, it properly finds both PDFs and DOCs.
    4. I went so far as to open the database and check the image.

    UPDATE: Other searches for images -do- work. The results are inconsistent. This makes me think that the index is not working properly or that some items are not being indexed. Any ways to test the integrity of the index or to ‘flush’ it?

    UPDATE #2: I unchecked the Expand Shortcodes box and tried again. It did -not- make the correct image visible BUT the results now include an image that does -not- contain the keyword -anywhere- I can see. Not in the tags, categories, caption, title, filename, nothing.

    • This reply was modified 1 year, 7 months ago by suntower.
    Plugin Author Mikko Saari

    (@msaari)

    1. Now I can take a look at your site.
    2. That’s correct, image attachments don’t really have post content to show there.
    3. And the “Index image attachments” box is also checked? Seems to be, as the search for “ray bishop” now returns the image.

    You can use the debugging tab to check how individual posts are indexed. To flush everything, you can reindex on the Indexing tab.

    The image that appears for the “ray bishop” search does have the word “bishop” in it. The name appears in the “media_donor_name” custom field. You have set Relevanssi to index all custom fields, visible and invisible, and that’s including lots of garbage metadata. I would recommend setting the custom field setting to “visible”, or to only include the specific fields you want to include.

    What is the correct image you expect to see in the results but don’t?

    Thread Starter suntower

    (@suntower)

    Thanks for being so quick and so diligent.

    Here is a link to an attachment/jpg that does not show in the Search for “Ray Bishop” even though it is tagged “Ray Bishop” and the media_donor_name is “Ray Bishop” and “Ray_Bishop” is in the file name.

    https://seatacnoise.info/?attachment_id=10557

    Plugin Author Mikko Saari

    (@msaari)

    Is that image publicly available? I get a 404 page.

    Thread Starter suntower

    (@suntower)

    Interesting! I get the same when not logged in as Admin.

    Is there some Post Status that might be involved?

    Plugin Author Mikko Saari

    (@msaari)

    Attachments have the post type of inherit, so if the image is attached to a private post, it’ll be private, too. Might that be the case? That would affect Relevanssi searches, too, as Relevanssi respects the post privacy settings.

    Thread Starter suntower

    (@suntower)

    No. In fact, the Attachment was not attached to any post. I then attached it to a Public post and it made no difference.

    Plugin Author Mikko Saari

    (@msaari)

    What does the Relevanssi debugger show for post 10557?

    Thread Starter suntower

    (@suntower)

    Does this give you what you need?

    Plugin Author Mikko Saari

    (@msaari)

    Yes: it shows Relevanssi has indexed the post correctly, and it should appear when searching for “ray bishop”. The reason it doesn’t is likely related to the fact it’s not available for non-logged-in users.

    I can’t tell from this view why that is so; images, in general, should always be visible. If a post has the status inherit but no parent – like an unattached image has – Relevanssi will assume the post is public.

    So – it’s hard to say. Does the Relevanssi admin search find this post?

    Thread Starter suntower

    (@suntower)

    The following search returns 3 items. 1 is a ‘Link’ and 2 are media attachments. The one I keep asking about is -missing- (10557).

    You searched for ray bishop – Sea-Tac Airport Noise And Pollution (seatacnoise.info)

    However, if I go into the Admin (Relevanssi is enabled for admin search) I get ONE result… 10557.

    Starting to drive me a little nuts–mainly because I am certain there are other occurrences like this.

    Have you heard of any incompatibilities with FileBird or is that not a likely possibility?

    Plugin Author Mikko Saari

    (@msaari)

    The WP admin search may or may not work well with Relevanssi. It’s not reliable and is not helpful here. What do you get from the Relevanssi admin search (Dashboard > Admin search)? That’s more useful information.

    I haven’t heard of any problems with FileBird. I know FileBird is used to add folders to Media Library. Are you using it for something else, something that might be related to the file access?

    Thread Starter suntower

    (@suntower)

    Oooh, aaaaahhh. ?? (I never noticed that before.)

    It returns 4 results–which is 100% correct.

    Plugin Author Mikko Saari

    (@msaari)

    Alright – that suggests Relevanssi is working correctly and returning the posts it should. Everything’s indexed well and when you’re logged in and an admin, you see all the posts.

    It’s hard to say why the picture is not showing up in the public search, but I believe that once you get the post to a state where non-logged-in users can see it, it should pop up in the Relevanssi search results as well.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Image Attachments not appearing. Filebird compatibility?’ is closed to new replies.