Labels within the quick search / quick navigation box?
Asked by Brian Bircham:

Hello all

Someone has reported that they can't find pages by labels from the Quick Search box (such as the one in the top bar of this very page). From what I've researched, this box searches by article title only, however someone else says that this is a bug as it should search by label. I know there's possible plugins that allow for this but the person who reported it said they were able to search for pages by label in this box without a plugin previously.

Can anyone help me and let me know which one of us is correct? Is the Quick Search box for searching by title only? Or should it find pages by label too?

Thanks in advance!

Brian


Answers:
author: Matthew J. Horn
body: Ah, ok, I get what you're asking now. I tested this on my own site and the result was no, entering the label did not bring up the page in the Quick Search. It was, however, the first hit on the resulting search page. I looked into seeing if you could extend the dosearchsite action to include labels, but couldn't find info on it.


author: Mick Davidson
body: Brian,

there's more info about search ranking here: <https://confluence.atlassian.com/display/DOC/Ranking+of+Search+Results>

Cheers.

comments: author: Brian Bircham
body: Hi Mick

Thanks for the response but I think I'm not getting my question across properly. Below is a sample "quick search". What I would like to know is if this should or should not include searches by label? I.e. if I was to add 'apples' as a label to the "Ranking of Search Results" page searched, then did a quick search as below for 'apples', would this still return the "Ranking of Search Results" page?

![Sample of a quick search](http://i34.tinypic.com/110g9e9.png)

Hope this exaplins my question more clearly

Brian


author: Matthew J. Horn
body: Ah, ok, I get what you're asking now. I tested this on my own site and the result was no, entering the label did not bring up the page in the Quick Search. It was, however, the first hit on the resulting search page. I looked into seeing if you could extend the dosearchsite action to include labels, but couldn't find info on it.


author: Brian Bircham
body: Thanks Matthew

Can you add that as an answer rather than a comment? Then I can assign you the points

Brian


author: Matthew J. Horn
body: The Quick Search box includes content, not just page titles. I don't think that labels is a default search field (meaning, it won't be included in the default search). However, according to this page:

<https://confluence.atlassian.com/display/DOC/Confluence+Search+Syntax>

You can preface a query with "labelText:" to search by label.

comments: author: Brian Bircham
body: Hi Matthew

Thanks for taking the time to respond!

Indeed, typing in to the Quick Search box and pressing return takes us to the full search page and lets us find labels as suggested. This works fine for us. Our argument is about the drop-down that appear while typing in the box itself before pressing return / clicking the magnifying glass. Does this display only matching titles? Or should it be showing label matches as well?

Our reason for wanting this is that we rely heavily on labels sometimes and want to make it as easy as possible to search based on a label

Brian