Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Livesearch Macro - Restrict to labels: Possible to work with AND & OR?

Oliver Mettauer January 8, 2020

Hi,

I am working on a wiki-platform, which is based in an own space. Due to this, I implemented the livesearch macro on the space homepage.

As known, it is possible to include defined labels (hope exclude will once be available too). I would like to add certain labels, so i get only pages of interest as result.

It seems that in preview search, the macro search the content with Label A "OR" B. After clicking enter the result appears with Label A "AND" B, means also: no results, because none of the pages have both labels.

Is there a way to add a AND or OR rule in the livesearch macro settings?

Thank you very much for your help!

Regards

Oliver

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 9, 2020

Hello there, @Oliver Mettauer !

As I understand, you need to have the OR operator in your Livesearch Macro. Looking through our documentation, I can tell you that the label list we specify is indeed an AND operator. Here is an excerpt from our documents about the label parameter:

Specify labels to limit the search to content with that label. If unspecified will search all content regardless of label.

Here is the whole page:

However, we can still use the OR operator within the search field itself. Here is an example:

  1. Create a label named old
  2. Create a label named new
  3. Label pages with one or the other
  4. In the Livesearch Macro, type this:
    1. labelText:old OR labelText:new
  5. The results should display all pages that contain at least one of the labels

 

Also, here is a couple of documents on Labeling and Search that will surely help! Take a look:

 

I hope this helps you out! Looking forward to your reply.

Oliver Mettauer January 9, 2020

Hi Diego

Thank you very much for your answer. Happy to get that detailed help here.

Indeed I already checked the article with the search syntax, the mentioned syntax labelText works fine with me. What I would like to know is if I can add an OR-Rule in the settings of the macro.

Regarding the description "restrict to label(s)" i am only allowed to separate the predefined labels with commas. When using the macro, the live preview seems to use an "OR"-Rule and the detail search (after clicking enter) an AND-Rule (the labels are set in separate filters).

Is there a way I can set "labelText:old OR labelText:new" in the macro settings? Or can I solve the problem by adding the livesearch by Wiki Markup?

Like # people like this
Romain Prieur January 28, 2020

Hello,

I have the exactly same issue "When using the macro, the live preview seems to use an "OR"-Rule and the detail search (after clicking enter) an AND-Rule (the labels are set in separate filters)."

Any update on this Topic?

Thanks for helping 

Like Travis Haglock likes this
Anden April 20, 2020

Hi @Diego

I am also facing the same issue as Romain and Oliver. Are there any updates for this?

Thank you,

Anden

Martin Heini April 29, 2020

So I am.

Khloe Salmon September 20, 2021

I'm also having this issue - is there any update on an OR rule for the Livesearch?

 

Many thanks

Khloe

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events