How do I search attachments to the current page?
Asked by Robert Lauriston:

I think this used to be simple, but with the awful UI makeover it seems to be impossible.


Answers:
author: Shannon S
body: Hi Robert,

When on a page in Confluence Cloud, you can click the three dots in the top right, and select the option Attachments. This will show you the list of attachments on the current page.

I've compared this with the earlier version and it doesn't appear this process has changed. So, if you were referring to a different feature, could you let me know what you used to do so I can let you know how it's changed?

Regards,

Shannon

comments: author: Robert Lauriston
body: I don't want a list of the attachments, I want to search their contents.

I don't remember how I did it with the old search UI. The new search UI has an option to search the current page, but it doesn't appear until I enter a simple search string, which navigates away from the current page.


author: Shannon S
body: Robert,

When you are typing a simple search term, it takes you to the **Full Search** which still functions as it did in the previous UI. I tested this on both the Server instance which has the old UI and the Cloud instance which has the new UI, and both require a full search before being able to restrict to the current page and search attachments specifically.

You can compare here:

* [Confluence Server Search](https://confluence.atlassian.com/doc/search-139528.html) (this is the old Confluence Cloud UI which Server is still currently using, thus I am linking to a server document)
* [Confluence Cloud Search](https://confluence.atlassian.com/confcloud/search-724765412.html) (this is the new Confluence Cloud UI search)

> Full search {#toc-hId-1788652568}
> ---------------------------------
>
> The full search allows you to search all content in all spaces (site and personal), personal profiles, attachments and space descriptions, or filter the results to show only what you're after.
>
> The search will also look at the content of the following types of attachments:  
> * Word
> * Text
> * PowerPoint  
> * Excel
> * PDF
* HTML  
If you are looking to search the content of attachments, then you will still need to use the Full Search as you were using in the previous version of the UI.  
It seems that either you were doing this previously, otherwise, [is it possible you were using an add-on](https://marketplace.atlassian.com/search?hosting=cloud&product=confluence&query=confluence%20search) to facilitate the search?

Regards,  
Shannon


author: Robert Lauriston
body: 1. I'm on a page with 50+ PDF attachments.

2. I click the magnifying glass Search icon and enter "theme," which I know occurs in only three of the PDFs. I get two hits, neither of which is right, and a link **Search for 'theme'** (EXCUSE ME? That's what I just did.)

3. I click that link, am navigated away from the current page, and get three pages of results.

How can I narrow those results to only the page from step 1?


author: Shannon S
body: Robert,

I can confirm it's not possible to narrow down your results from step 1, which is known as Quick Search.

Per our documentation:
> To perform a quick search in Confluence, choose the search field at the top-right of every page or type **/** on your keyboard to place your cursor in the search field. Type the name of a page, blog post, person, file/attachment, or space and choose from the list of options displayed.

From that description, you can use Quick Search to search the name of a document, page, etc. but not further details on this.

I've confirmed with my other Confluence support colleagues and they suggested the same as I did earlier - that it might have been an add-on you were using, but any way to restrict the search to current page or attachments can only be done through Full Search.

Another possibility is the [Livesearch Macro](https://confluence.atlassian.com/confcloud/livesearch-macro-724765225.html), but I don't see a way to restrict to a certain page using that. You can try it, however, and see if it could help you?

Regards,

Shannon


author: Robert Lauriston
body: I had no add-ons.

How do I restrict Full Search to a specific page?


author: Shannon S
body: Robert,

If you want to restrict the search of attachments to a specific page you can try it like this:

![Screen Shot 2018-01-23 at 5.39.26 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/13183i62B2B877847D7D56/image-dimensions/152x476?v=v2 "Screen Shot 2018-01-23 at 5.39.26 PM.png")

That way it should search only attachments that are children of the current page. You can also put the name of a page there.

Can you try that and let me know if you can get the results you need that way?

Regards,

Shannon


author: Robert Lauriston
body: That doesn't work because the awful broken UI navigates away from the current page when switching from useless simple search to actual useful real search.


author: Shannon S
body: Hi Robert,

That's the intended behavior to move from the current page to the full search page, so it does not appear that anything is actually broken in this case.

I tested the search on my own instance and I can confirm that full search does work to find contents of an attachment, but it doesn't work as I expected to search children of the current page, or even the name of the page with the attachments.

I found a feature request to search current page, but it appears to not be something we will be implementing in the near future.

* [CONFCLOUD-33256](https://jira.atlassian.com/browse/CONFCLOUD-33256)

So if you need to search your PDF attachments, you can limit your search to attachments only, and the space in question.

Confluence isn't built to be used as a file repository, so my earlier recommendation to install add-ons that assist with this kind of search still stands.

If you have any feedback to provide the developers, please feel free to use the feedback form you can access when clicking on your user profile in the bottom left-hand corner.

Thank you for your understanding!

Regards,

Shannon


author: Robert Lauriston
body: What's broken is the UI. The full search should be available without navigating away from the current page.


author: Shannon S
body: Robert,

I can say this is the intended behavior and I understand it's not desirable for you.

The best course of action is still to send the feedback directly through the UI, but I have also created a feature request for you:

* [CONFCLOUD-58911](https://jira.atlassian.com/browse/CONFCLOUD-58911)

Please vote on the request to show your interest, and comment with your usage case and feedback.

Kind regards,

Shannon


author: John Zelno
body: I was trying to do the same thing, but with 950 page attachments. It seems that for me, setting the "with parent = current page" filter, I didn't get any results returned. Also, I wanted to create a search button on the page that would search the page attachments for the general public to use, and I didn't want to instruct them to take this extra step.

What I ended up doing instead was to add a label (e.g. "my_page_attachment" to each of the attachments on the page, and then I used the livesearch macro, with the restrict to label option set to "my_page_attachment". Since the label is unique to just the attachments on that page, the search returns only those attachments, without the user needing to add additional filters after the fact.


Tags: attachment

search