How are label names considered when searching?

Since labels can only be one word, how does the use of no spaces, hyphens or underscores in labels affect what is returned in the search results?

For example, I have a page with the following labels: signon, sign_on, sign-on. I search for "sign on" (with or without quotes). Would this page show up in the search results since the labels don't exactly match what is being searched for?

3 answers

0 votes
Davin Studer Community Champion Nov 13, 2014

Well, I tried it on my instance and it returned the page with and without quotes. Honestly, I was surprised that with quotes the page was returned because when you quote the terms it means you are looking for an exact search and none of those labels are exactly that. But it returned anyway.

On a side note. Typically, I think the best of use of labels should not be for search purposes but rather to group types of documents. If you want your users to find the documents then the terms should be in the content of the document itself. A good label would be something like "policy". So if you wanted you could find all of the documents in the system that are policies by using this search syntax (labelText:policy). You certainly can use it for keywords ... it will work. But, I think the best use is for categorizing.

Hi Davin,

Could you tell me exactly what you tried? I'm not sure what you mean by "it". I appreciate you taking the time to help me. 

Davin Studer Community Champion Nov 13, 2014

I created a page and gave it all three labels that you mentioned and then did a search both with quotes and without for sign on.

Ok, I will do the same, but test with one label at a time since I am still not clear whether one version has more power over another.

Based on my test, it looks like sign-on, sign_on, and sign (one label) on (another label) are treated the same when searching for the whole phrase, and in all instances my page was returned near the top in my search results. The label signon did not return my page in the first page of the search results.

Hi, Just wondering which search you guys are using? Are you using the specific labelText search? I am trying to get the labels to show in the Confluence search but has not been successful. Thanks.

I am not. I entered ​Sign On ​into the global search box. Since I'm not using the labelText search, there are other things that influence page rank ( that I had to consider as well.

Davin Studer Community Champion Nov 18, 2014

We have been referring to just regular searches. The regular search will look at labels too. The search term labelText is if you only want to search by label. If you want to search by labelText the syntax is ... labelText:mylabel

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,196 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you