• Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • None
    • 2
    • 1
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      I want to use a live search macro that find items in a determinated list of spaces. At present I only can restrict to one space key or using "@self"

        1. image-2018-03-01-12-32-01-652.png
          image-2018-03-01-12-32-01-652.png
          23 kB
        2. image-2018-03-01-13-07-49-236.png
          image-2018-03-01-13-07-49-236.png
          134 kB
        3. livesearch.png
          livesearch.png
          23 kB
        4. livesearchresult1.png
          livesearchresult1.png
          12 kB

            [CONFSERVER-41238] Restrict a live search macro to more than one space

            I want to be able to give users the ability to limit their search by default to a set of spaces (could be their favourite spaces, or could be a fixed list - I could work with either) 

            Not sure sure why the LiveSearch macro doesn't just allow all of the filtering possible in the parameters that can be used in the syntax for 

            dosearchsite.action?cql=

            including the ability to pick favourite spaces (and other text/label filters to be added to whatever the user enters while we're on the subject)

            I can put a URL with the dosearchsite.action?cql= syntax which takes the user to a search page with the necessary defaults but that's nastier than just having a search box embedded in the page
             
            Answer

            Harry Knott added a comment - I want to be able to give users the ability to limit their search by default to a set of spaces (could be their favourite spaces, or could be a fixed list - I could work with either)  Not sure sure why the LiveSearch macro doesn't just allow all of the filtering possible in the parameters that can be used in the syntax for  dosearchsite.action?cql= including the ability to pick favourite spaces (and other text/label filters to be added to whatever the user enters while we're on the subject) I can put a URL with the dosearchsite.action?cql= syntax which takes the user to a search page with the necessary defaults but that's nastier than just having a search box embedded in the page   Answer

            While the global search results page now includes an option to filter by space category, there's still no way to embed a search field on a page pre-configured to search spaces of a certain category.

            The ‘Livesearch’ Macro provides an option to Restrict to label(s), but “label” here means page labels only — space (category) labels are not considered.

            An option should be added to search all spaces in a specified category.

            Roger Sheen added a comment - While the global search results page now includes an option to filter by space category, there's still no way to embed a search field on a page pre-configured to search spaces of a certain category. The ‘Livesearch’ Macro provides an option to Restrict to label(s) , but “label” here means page labels only — space (category) labels are not considered. An option should be added to search all spaces in a specified category.

            Vladimir Bruzek added a comment - - edited

            I guess this is closely related to: https://jira.atlassian.com/browse/CONFSERVER-37239

            Vladimir Bruzek added a comment - - edited I guess this is closely related to:  https://jira.atlassian.com/browse/CONFSERVER-37239

            Exactly - it works in the Confluence Search, but not with the LiveSearch macro.

            I can't expect from our users that they build such search queries, thus my attempt to get it run with the LiveSearch macro.

            Markus Raab added a comment - Exactly - it works in the Confluence Search, but not with the LiveSearch macro. I can't expect from our users that they build such search queries, thus my attempt to get it run with the LiveSearch macro.

            correct <<>> are variables

            The search string like

            business AND (spacekey="CELUM" OR spacekey="Sales")

            works in my Confluence Search page but it don't work in the LiveSearch preview.

            You must use the exact syntax case (seen in the URL) for the space keys (Sales and CELUM)

            Wolfgang Lutz added a comment - correct <<>> are variables The search string like business AND (spacekey="CELUM" OR spacekey="Sales") works in my Confluence Search page but it don't work in the LiveSearch preview. You must use the exact syntax case (seen in the URL) for the space keys (Sales and CELUM)

            Obviously my last comment did not go through, so I'll try it again.

            I set it up exactly as listed by both of you. Also I checked about upper-/lower-case. Everything is fine.

            I did not know before that I can use <<searchstring>> as a variable in a Macro. Or did I understand that wrong. I literally added the mentioned string to the macro configuration:

            <<searchstring>> AND (spacekey = "<<INFO>>" OR spacekey="<<BUSSALES>>")

             

            The search however shows results from all spaces.

             

            Markus Raab added a comment - Obviously my last comment did not go through, so I'll try it again. I set it up exactly as listed by both of you. Also I checked about upper-/lower-case. Everything is fine. I did not know before that I can use <<searchstring>> as a variable in a Macro. Or did I understand that wrong. I literally added the mentioned string to the macro configuration: <<searchstring>> AND (spacekey = "<<INFO>>" OR spacekey="<<BUSSALES>>")   The search however shows results from all spaces.  

            Wolfgang Lutz added a comment - - edited

            Do you use the exact spacekey (mind upper- and lower-case)?

            Wolfgang Lutz added a comment - - edited Do you use the exact spacekey (mind upper- and lower-case)?

            M added a comment -

            try the way Wolfgang Lutz commented:

            <<searchstring>> AND (spacekey = "<<INFO>>" OR spacekey="<<BUSSALES>>")

            M added a comment - try the way Wolfgang Lutz commented: <<searchstring>> AND (spacekey = "<<INFO>>" OR spacekey="<<BUSSALES>>")

            this fast copy/pasting - sorry about that.

            So this works now in the advanced search 

            business AND (spacekey = "INFO" OR spacekey="BUSSALES")

            Any idea how I can pack that into a search-macro, e.g., livesearch?

            Because using the search string is actually more complicated than just clicking it together (see screenshot).

             

            Markus Raab added a comment - this fast copy/pasting - sorry about that. So this works now in the advanced search  business AND (spacekey = "INFO" OR spacekey="BUSSALES") Any idea how I can pack that into a search-macro, e.g., livesearch? Because using the search string is actually more complicated than just clicking it together (see screenshot).  

            M added a comment - - edited

            there is a typo: spaceke*y* (and not spacekex)

            M added a comment - - edited there is a typo: spaceke*y* (and not spacekex)

              Unassigned Unassigned
              6fcb50c9f266 Mark Wittig
              Votes:
              75 Vote for this issue
              Watchers:
              35 Start watching this issue

                Created:
                Updated: