Controlling what gets displayed in search results in confluence
Asked by Rahav:

Can you please point me to an explanation of what is being displayed in the search results. E.g. certain number of characters before or after the searched text.

Also, it looks like Confluence treats the pages as one long string when it displays the results, ignoring line breaks or whether the text appears in a table header on the next line. Is that reasonable or expected behavior?


Answers:
author: Shannon S
body: Rahav,

You can read more about how Confluence Search works below:

* [Confluence Cloud Search](https://confluence.atlassian.com/confcloud/search-724765412.html)
* [Confluence Search Syntax](https://confluence.atlassian.com/confcloud/confluence-search-syntax-724765423.html)

Can you let me know what you mean by your example? Confluence will search for the word you typed unless you use any special syntax as above. If you have a more concrete example of something you searched for and the results you received but were not expected, please let us know.

Lastly, regarding your mentioning of the results showing as a long string, it currently shows the first 4 lines in the results. Can you let us know what you would prefer the result to look like?

Regards,

Shannon

comments: author: Rahav
body: Thank you [@Shannon S](/t5/user/viewprofilepage/user-id/510046) for your reply. Sure I'll be happy to give you an example. The problem is that we use Confluence for content creation. As users we want to focus on exactly that, content creation and In those moments we do not need our train of thought to drift into deciphering search results.

In the following example you will find two paragraphs that while following each other are not related. They are two separate paragraphs:
> There were numerous failed attempts at digital or electronic cash before Bitcoin. Bitcoin's key difference compared to most of these attempts is decentralization. The core innovation of Bitcoin that enables decentralization is the blockchain.
>
> Smart property, and digital contracts that govern them, were pioneered by Nick Szabo and others in the early 1990s, well before Bitcoin was proposed. However with a blockchain, the idea can be made concrete.

Now if you will search for the words "were pioneered" Confluence will show:
> innovation of Bitcoin that enables decentralization is the blockchain. Smart property, and digital contracts that govern them, **were** **pioneered** by Nick Szabo

Do you see why the search results do not make sense? Confluence just treats the text as a long string and does not understands the context. In this case the demarkation is clear, those are two separate paragraphs. Why join them?

One easy fix could be to keep the original formatting when displaying search results. If Confluence did not choose to show what were clearly two paragraphs it would not be as confusing. But there are probably much better ways to do it for a content creation company as Confluence.

[@Shannon S](/t5/user/viewprofilepage/user-id/510046) I would like to take the opportunity to again voice my concern with another usability issue in Confluence search. As I wrote above we are creating content and expect smooth and supporting workflows that help us create content. I would expect that after getting the search results I will be able to click on the result I was searching for and Confluence would take me directly to that sentence. Not to the top of page.


author: Shannon S
body: Rahav,

Thank you for taking the time to explain your requirements.

I found a few feature requests from several years ago asking for the same thing, but they were closed as we didn't have intention to implement this. These were quite old, so I have raised this request again here:

* [CONFSERVER-56419](https://jira.atlassian.com/browse/CONFSERVER-56419) *Retain formatting in search results*

Please comment on this case and include your examples there, as well as your usage case. Voting on the request will help show your support for it and helps us to understand the amount of demand.

Lastly, for the 2nd issue you raised, I have already created a feature for this below:

* [CONFSERVER-54996](https://jira.atlassian.com/browse/CONFSERVER-54996) *Ability to jump to exact line referenced in search results*

Please feel free to do the same for this case.

Regards,

Shannon


Tags: cloud

confluence-cloud

result

search