The Atlassian Extension Spaces have been migrated to http://plugins.atlassian.com. These pages are now deprecated and will soon be deleted.

Advanced Search Plugin

Name Advanced Search
Vendor Adaptavist (Website)
Authors Dan Hardiker
Homepage http://confluence.atlassian.com/display/CONFEXT/Advanced+Search+Plugin
Issue Management
Continuous Integration n/a
Categories Confluence Content
Most Recent Version 1.0.6
Availability confluence v2.9.2 to v3.1.1
State Stable
Support By: Adaptavist
License Freeware / Open Source (BSD)
Price Free
Release Docs
Java API Docs n/a
Download Source https://studio.plugins.atlassian.com/source/browse/SRCH/tags/1.0.6/
Download JAR 18683
This plugin now accessible through the Confluence Repository Client.
Confluence v2.2.x concatonates query terms using OR, where as Confluence v2.3.x and beyond uses AND.

The effect for you is that if you have multiple label/metadata fields, they will be ANDed together now and not ORed. So where before if you had 3 labels passed over, it would return things matching any – now it only returns things matching them all.

Description

This plugin provides a set of macros utilising DWR (AJAX) searching capabilities. These macros center around providing a form-based interface for building search queries, the output is dynamically sortable and can be customised.

The data from the fields form generate a search query which is then processed by lucene via the Confluence API, with all the terms (each field) being AND'ed together (so all terms must match, not any). There is no paging on the results, and the results can show the rating of each blog / page - however showing the rating column will slow down the showing of the results somewhat. The rating is based on the Rate Macro.

Automatic running queries is also possible so that the search form submits the default values and returns the results automatically. The search form can also be hidden, if desired.

Usage

Only a single {search-form} and {search-results} can be used on a page in any order. Both must be present to operate properly.

{search-form}

This defines the seach criteria part of the page, which can optionally be hidden. It has a body that encapsulates the {search-input}, {search-select} and {search-submit} macros which define any number of search criteria or filters.

Parameter Description Type Default Required
autoSubmit Submit the form as soon as the page loads (providing default results) boolean false
hidden Hide the form from view (only useful with autoSubmit) boolean false

So, let's take a look at the macros that go in the body of the search-form (an example is shown lower down this page)...

{search-input}

This provides an input field synonymous to a HTML input field and has no body.

Parameter Description Value Default Required
match Type of Search Field string (label, metadata, query) none
metadataKey Metadata Key - only valid for match=metadata string none unless match=metadata, then
type Type of Field string (text / checkbox / hidden) none
value Value of the Field string none
checked Inital State - only valid for type=checkbox boolean false

As you can see, you can create hidden fields - this is really useful if there is a filter you always want to apply to the search form but don't want users to see.

{search-select}

This provides an select field (drop-down list) synonymous to a HTML select field, with options defined in it's body by the {search-option} macro.

Parameter Description Value Default Required
match Type of Search Field string (label, metadata, query) none
metadataKey Metadata Key - only valid for match=metadata string none unless match=metadata, then
nullLabel Label of the "unanswered" option string no "unanswered" option

{search-option}

This provides an option field synonymous to a HTML option field, its body is wiki rendered and is the outputted label for the option.

Parameter Description Value Default Required
value Value of the Field string empty
selected Is this Option Selected boolean false

{search-submit}

You MUST include a search-submit within the search-form if you wish your users to be able to manually submit the search. If you hide the search form and set it to auto submit, then this is not needed.

This provides a submit button. You need one of these for the form to work!

Parameter Description Value Default Required
default Label for the Button string Submit

{search-results}

This provides the target for search results to goto, it also configures how the search results are displayed.

  • Types - There are 4 content types you can search for currently. You specify them as a comma separated list and any of the specified content types are included in the results. The 4 content types are: page, blogpost, userinfo and spacedesc.
  • Fields - There are 6 fields, and can be displayed in any order - however title must always be display. They can also be renamed:
    rating,title!My Title,author

    That would put the fields in that order, renaming the title field to "My Title".

  • Excerpts - If shown, the contents of the {excerpt} macro are used first and then it falls back on the the content excerpt used in the standard search results.
  • Ratings - If the rate macro is use (or has been in the past) and the page has ratings, then an average is found. If the rateThreashold (defaulting at 5) isn't met (i.e. if there haven't been 5 people rating this content) then it uses 0. If there isn't any rate data then it defaults to 0 as well. NOTE: If the content has been rated in the past, and the rate macro is then removed - the rating data will sill remain and will still be used by this plugin. This can be worked around by detecting the presence of a {rate} macro first in the content - however this work around isnt in effect yet. Please let me know if this is needed.
Parameter Description Value Default Required
fields The selection, order and naming of the fields string title!Resource,rating,creation,modified,author,space!Partner
types The content types to search for string page,blogpost
showExcerpts Should I show excerpts? boolean true
sortField The fields to sort on initially. string (a field from fields) title
sortDir The direction to sort on initially. string (asc / desc) asc
maxResults How many results should I truncate to? (users will be warned in the case of more results than shown) int 20
rateThreshold How many ratings are needed before the average is used? int 5
debug Should I show the query I generated for debugging? boolean false

Tutorial

To begin with you are going to want to have a basic search form:

Basic Search Form
{search-form}
  {search-input:type=text|match=query}
  {search-submit:Search}
{search-form}

{search-results}

This about as basic as it gets, pretty much emulating what the normal Confluence search does - except limiting results to pages and blog posts. From here we can built up the search so that it is tailored to our needs. I now have the following criteria:

  1. I want to set the default value of the query to repository plugin, as if that was typed into the search engine.
  2. I want to only return content that has the searchable label - but this shouldn't be displayed as an option.
  3. I want the search to be run automatically with the defaults above.
Second Search Form
{search-form:autoSubmit=true}
  {search-input:type=text|match=query|value=repository plugin}
  {search-input:type=hidden|match=label|value=searchable}
  {search-submit:Search}
{search-form}

{search-results}

Great! I would like to customise the results though, so that it shows the rating, author, title, then space. I want to sort by rating descendingly. I also want the title column to be called Content Title instead.

Modified Search Results
{search-results:fields=rating,author,title!Content Title,space|sortField=rating|sortDir=desc}

Advanced Example

The following provides a general search term box, with checkboxes for searching for different preset keywords as well as an advanced one for searching for one label but not another.

{search-form:autoSubmit=true}{search-input:type=text|match=query}

{search-input:type=checkbox|match=query|value=label:( +global?agency-home ) NOT label:( +global?hidden )} Normal label "agency-home" but not "hidden" label
{search-input:type=checkbox|match=query|value=Nordic Scandinavia "Northern Europe" Denmark Finland Iceland Norway Sweden} Nordic States
{search-input:type=checkbox|match=query|value="European Union" Germany France "United Kingdom" UK Italy Spain Poland Romania Netherlands Greece Portugal Belgium Czech "Czech Republic" Hungary Sweden Austria Bulgaria Slovakia Denmark Finland Ireland Lithuania Latvia Slovenia Estonia Cyprus Luxembourg Malta} European Union
{search-input:type=checkbox|match=query|value=Germany Switzerland Liechtenstein Slovakia Poland Czech "Czech Republic" Austria Hungary Slovenia} Central Europe
{search-input:type=checkbox|match=query|value=Burundi Comoros Djibouti Eritrea Ethiopia Kenya Madagascar Malawi Mauritius Mozambique Réunion Reunion Rwanda Seychelles Somalia Uganda "United Republic of Tanzania" Tanzania Zambia Zimbabwe|checked=true} Eastern Africa
{search-submit:Search}
{search-form}

{search-results:types=page,blogpost,userinfo,spacedesc|rateThreshold=0|maxResults=50|fields=space!Bubble,title,rating,author|sortField=rating|sortDir=desc|showExcerpts=true|debug=true}

See Also

Labels

plugin plugin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 26, 2006

    dieter says:

    Nice macro. Is it possible to have an example using metadata / rate macro? Is i...

    Nice macro. Is it possible to have an example using metadata / rate macro?

    Is it possible:

    If you have for example 5 pages with rate plugin, that are labeled = TEST.

    to order these 5 ratings on a summary page? TITLE, AUTHOR, RATING (ordered by rating)

    How to? Thanks.

    1. Sep 26, 2006

      Guy Fraser says:

      That's almost exactly what the tutorial does, however, for avoidance of doubt......

      That's almost exactly what the tutorial does, however, for avoidance of doubt...

      {search-form:autoSubmit=true|hidden=true}
       {search-input:type=hidden|match=label|value=test}
      {search-form}
      {search-results:fields=title,rating,author|sortField=rating|sortDir=desc}
      

      That will automatically submit the search for things with label of "test" (labels are always lowercase) without displaying the search form so only the results are shown. The resuls show a table of title, rating and author with the default sort set to rating but you can click any heading on the table to change sort order.

      1. Sep 26, 2006

        Guy Fraser says:

        oops - missed the search-submit: window.SyntaxHighlighter.config.clipboardSw...

        oops - missed the search-submit:

        {search-form:autoSubmit=true|hidden=true}
         {search-input:type=hidden|match=label|value=test}
         {search-submit:Search}
        {search-form}
        {search-results:fields=title,rating,author|sortField=rating|sortDir=desc}
        
        1. Sep 26, 2006

          Dan Hardiker says:

          If autoSubmit doesnt work without a submit button - that's a bug.

          If autoSubmit doesnt work without a submit button - that's a bug.

          1. Sep 26, 2006

            Guy Fraser says:

            Possibly, I was always under the impression that the search button is always req...

            Possibly, I was always under the impression that the search button is always required...

      2. Sep 27, 2006

        dieter says:

        It still doesn't work? I always get "There were no results for your search crite...

        It still doesn't work? I always get "There were no results for your search criteria."

        I tried the basic search macro to test: (attached image here)

        but again: "There were no results for your search criteria."

        There are some dependicies for this plugin?

        1. Sep 27, 2006

          dieter says:

          i meant the basic search form instead of macro

          i meant the basic search form instead of macro

        2. Sep 27, 2006

          Dan Hardiker says:

          In the {search-results} set debug=true. This will output the search query used -...

          In the {search-results} set debug=true. This will output the search query used - try this in the Confluence search.

          Please paste the search query here and I'll try to help.

          1. Sep 27, 2006

            dieter says:

            debugging: Query: type page blogpost ) AND ( test ) in confluence search: S...

            debugging:

            Query: type page blogpost ) AND ( test )

            in confluence search:

            Searched for type page blogpost ) AND ( test ) in Global Spaces

            • The search did NOT include Mail
              Matching labels:test
              Related Labels:(None)
            1. Sep 27, 2006

              Dan Hardiker says:

              and if you do a confluence search for just "test" does it yeild any results? If ...

              and if you do a confluence search for just "test" does it yeild any results? If not, then this macro wont either, as it's based on the confluence search engine!

              1. Sep 28, 2006

                dieter says:

                For confluence search (search box on right top of screen):it returns the label "...

                For confluence search (search box on right top of screen):it returns the label "test", see also last comment, and if you click you see all the pages labelled with the label "test"

  2. Sep 29, 2006

    Juan Leon says:

    I found the example in Dan's tutorial of how to create a NOT condition especiall...

    I found the example in Dan's tutorial of how to create a NOT condition especially helpful:

    {search-input:type=checkbox\|match=query\|value=label:( \+global?agency-home ) *NOT label:(* \+global?hidden )} Normal label "agency-home" but not "hidden" label

    How can I create a similar effect without the checkbox?  What I'd like to do is (invisibly) place a condition on all searches run by the user so that items with a certain label are not returned--or at least not displayed.

    1. Sep 29, 2006

      Guy Fraser says:

      type=hidden

      type=hidden

  3. Sep 29, 2006

    Hitesh Seth says:

    We are still using Confluence 2.1.x. Is it possible to leverage this plugin in a...

    We are still using Confluence 2.1.x. Is it possible to leverage this plugin in a confluence 2.1.x environment?

    Here is the Error that I get when trying to install it

    The following error(s) occurred:

    • There were errors when uploading this plugin: com.atlassian.plugin.PluginParseException: Could not load class: uk.ltd.getaheadplugin.dwr.DWRServlet

    Thanks

    1. Sep 30, 2006

      Dan Hardiker says:

      I'm afraid not - as shown in the Availability table at the top, this is only ava...

      I'm afraid not - as shown in the Availability table at the top, this is only available on Confluence v2.2.1a and above as there were some important plugin classloader changes performed in that version.

      Is there any reason you haven't upgraded to 2.2.x yet?

  4. Oct 04, 2006

    Stuart Donovan says:

    Can I restrict the search to one or more spaces?

    Can I restrict the search to one or more spaces?

    1. Oct 26, 2006

      Dan Hardiker says:

      Not currently.

      Not currently.

    2. May 09, 2008

      Eric Banford says:

      You can search across different spaces like this: {search-form} {search-input:...

      You can search across different spaces like this:

      {search-form}

      {search-input:type=text|match=query}
      {search-input:type=hidden|match=query|value=spacekey:SPACE1 OR spacekey:SPACE2}
      {search-submit:Search}
      {search-form}
      {search-results}

      Does anyone see any issues with this?

  5. Oct 17, 2006

    Jesse A Crowley says:

    Does anyone have a good example of the search-select option?

    Does anyone have a good example of the search-select option?

    1. Oct 26, 2006

      Dan Hardiker says:

      {search-form} {search-select:match=query} {search-option:value=hello}Say ...
      {search-form}
      
      {search-select:match=query}
        {search-option:value=hello}Say Hello{search-option}
        {search-option:value=goodbye}Say Good Bye{search-option}
        {search-option:value=blahblah}Bleh!{search-option} 
      {search-select}
      
      {search-submit:Search}
      
      {search-form} 
      
  6. Nov 10, 2006

    Michael says:

    Can i display the author name of a page ? ... The author paramater of search-re...

    Can i display the author name of a page ? ...

    The author paramater of search-result returns the name of the last modifier and not the author :/

    1. Nov 10, 2006

      Dan Hardiker says:

      Hi, Unfortunately that is hard-coded in; you would need to check out the source...

      Hi,

      Unfortunately that is hard-coded in; you would need to check out the source and modify the SearchDWR class, then use maven to rebuild it.


      Dan Hardiker
      Adaptavist.com Ltd

  7. Nov 17, 2006

    Charles Hill says:

    Is it possible to have a NOT expression on the metadataKey field as well?

    Is it possible to have a NOT expression on the metadataKey field as well?

  8. Dec 14, 2006

    Paul Carruthers says:

    Just a quick question. Is it possible to limit the search to something specific,...

    Just a quick question. Is it possible to limit the search to something specific, such as space labels or the spacedesc? Want to build a custom page using this instead of the general Confluence serach.

    Cheers,

    Paul. 

  9. Dec 18, 2006

    Mert Caliskan says:

    how can i search mails too with this advanced search plugin?

    how can i search mails too with this advanced search plugin?

  10. Dec 21, 2006

    Régis CHOURAQUI says:

    Nice plugin. Someone asked for a search restricted by space, I just to add my i...

    Nice plugin.

    Someone asked for a search restricted by space, I just to add my interest for this option.

    Thanks.

     
    Régis.

  11. Jan 11, 2007

    Régis CHOURAQUI says:

    Hi,  Just one request : Can you add "attachments" in "types" of search su...

    Hi, 

    Just one request :

    Can you add "attachments" in "types" of search supported ?

    For the moment I can't see any answer about .doc .xls .pdf . ..... It's quite a problem.

    Thanks for your help.

    Régis 

  12. Jan 23, 2007

    Grigorio V. Moshkin says:

    Hi, I have a trouble: I've installed the plugin. Confluence said in Administra...

    Hi, I have a trouble:

    I've installed the plugin. Confluence said in Administration->plugins that "Adaptavist Advanced Search
    All modules enabled."

    I type a tutorial search form macro (or another, more complicated macro) in my own page edit tab, then press "Save" and switch to view page tab.

    But I see the submit button being ALWAYS disabled. So I can not press it to start search itself.

    And Confluence log file "atlassian-confluence.log" contains the following lines:

    2007-01-23 12:42:34,062 INFO [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 2.2.9 (build #527)
    2007-01-23 12:43:59,750 ERROR [ltd.getahead.dwr.DWRServlet] error Missing config file: advanced-search-dwr.xml
    2007-01-23 12:43:59,750 WARN [getahead.dwr.impl.DefaultProcessor] warn Page not found (/advanced-search/dwr/engine.js). In debug/test mode try viewing /[WEB-APP]/dwr/
    2007-01-23 12:43:59,859 WARN [getahead.dwr.impl.DefaultProcessor] warn Page not found (/advanced-search/dwr/interface/SearchDWR.js). In debug/test mode try viewing /[WEB-APP]/dwr/
    2007-01-23 12:44:22,000 WARN [getahead.dwr.impl.DefaultProcessor] warn Page not found (/advanced-search/dwr/engine.js). In debug/test mode try viewing /[WEB-APP]/dwr/
    2007-01-23 12:44:22,062 WARN [getahead.dwr.impl.DefaultProcessor] warn Page not found (/advanced-search/dwr/interface/SearchDWR.js). In debug/test mode try viewing /[WEB-APP]/dwr/

    So, does anybody know what goes wrong?

    Sincerely yours,
    Grigorio V. Moshkin,
    Garant Service - Moscow State University http://www.garant.ru

  13. Feb 22, 2007

    Audrey M. Schaffer says:

    Hello - I'm having trouble using the "NOT label" command. I want the search to ...

    Hello - I'm having trouble using the "NOT label" command.

    I want the search to run and not consider pages which I have labeled "navigation" (since these are the pages that make up my navigation bar and do not have substantive content).  I tried to copy the example above, and wrote the command as:

    {search-input:type=hidden\|match=query\|value=NOT label:navigation}
    

     

    But, what this has done is stopped returning any results for (I think) any pages, even those without any labels whatsoever.  If I remove this line, I get search returns of both my navigation pages and all other pages.

    What am I doing wrong?  Thanks for any help in advance!

    -Audrey 

    1. Feb 22, 2007

      Dan Hardiker says:

      Please add "debug=true" to the {search-results} macro, which will output the que...

      Please add "debug=true" to the {search-results} macro, which will output the query which it is building. This query string can be used in the standard Confluence search engine (that's what it uses as the back-end after all). You can then fix the query string, and reverse engineer the changes as appropriate.

      In general, debugging starts with working out the query you want it to end up with, and then work out how to get that generated.

      1. Feb 26, 2007

        Audrey M. Schaffer says:

        Dan, I've been working with the debugger and I have shed some more light into t...

        Dan,

        I've been working with the debugger and I have shed some more light into the situation, but still no solution.

        In using the simple search, it seems that a command such as: "Germany AND NOT navigation" will return the search results I want.  But the command "Germany AND (NOT navigation)" will return nothing (same results as I described above).  This is only a problem because the Advanced Search only inputs individual terms surrouned by parenthesis.  

        Is there a way to remove the parens in the advanced search? 

        -Audrey 

        1. Feb 26, 2007

          Dan Hardiker says:

          Hrm - in order to deal with the multiple concatenations, it adds in the parenthe...

          Hrm - in order to deal with the multiple concatenations, it adds in the parenthesis. The plugin would need to be modified to allow them to be removed.

          1. Feb 26, 2007

            Guy Fraser says:

            You could always use "-germany" which means "result must not contain germany" in...

            You could always use "-germany" which means "result must not contain germany" instead of "NOT".

  14. Feb 26, 2007

    Audrey M. Schaffer says:

    Also, another question (that I see above, but which was never answered) while I'...

    Also, another question (that I see above, but which was never answered) while I'm here:

     Searching attachments as well as pages & blogposts is not one of the "type" options, yet this is a functionality that the simple search has.  How can you utilize advanced search to also search attachments?

    Thanks!

    -Audrey 

    1. Feb 26, 2007

      Dan Hardiker says:

      We didn't need to search attachments, and so we didn't implement it. The plugin ...

      We didn't need to search attachments, and so we didn't implement it. The plugin will need to be modified to add this functionality.

  15. Mar 12, 2007

    seb says:

    Hi, Any news regarding 2.3.3 compatibility ? I can't even activate debug mode, ...

    Hi,

    Any news regarding 2.3.3 compatibility ?
    I can't even activate debug mode, the submit button cannot be clicked and when I push the Enter key on my keyboard I get no result. This plugin should be very useful to us.
    I can't wait to see this plugin live ...

    Thanks for your contribution.

    Seb.

  16. Mar 21, 2007

    Marc Rudkowski says:

    Hi, I assume this is not compatible yet with versions 2.4 or 2.3 from the earli...

    Hi,

    I assume this is not compatible yet with versions 2.4 or 2.3 from the earlier threads...I'm seeing the searches fail under version 2.4. Hoping this gets resolved soon...

    Thanks!

    -Marc

    1. Apr 12, 2007

      Ming Yu says:

      We are using version 2.4.2.  The Advanced Search Plugin is always disabled....

      We are using version 2.4.2.  The Advanced Search Plugin is always disabled.  I checked the log, and this is the information in the log:2007-04-11 17:02:36,277 WARN [TP-Processor8] [getaheadplugin.dwr.impl.DefaultCreatorManager] warn Error setting class=com.adaptavist

      .confluence.advancedSearch.SearchDWR on uk.ltd.getaheadplugin.dwr.create.NewCreator

      2007-04-11 17:02:36,281 ERROR [TP-Processor8] [getaheadplugin.dwr.impl.DefaultCreatorManager] error Creator: 'NewCreator[SearchDWR]'

      for SearchDWR.js is returning null for type queries.

      2007-04-11 17:02:36,289 ERROR [TP-Processor8] [[Catalina].[localhost].[/confluence].[servlet-module-container-servlet]] invoke Servl

      et.service() for servlet servlet-module-container-servlet threw exception

       

      1. May 09, 2007

        Eric Litman says:

        Any new updates on getting this working on recent versions of Confluence? Adapt...

        Any new updates on getting this working on recent versions of Confluence?

        Adaptavist: you made something useful that people rely upon. If you can't dedicate the resources to updating it, why not charge for it? You can count at least one on the list who'd kick in toward development.

        Thanks.

        1. Jun 04, 2007

          Dan Hardiker says:

          I currently don't have the time / resources to perform such work – althoug...

          I currently don't have the time / resources to perform such work – although there are some similarities with my codegeist entry, which I have done in my spare time.

          We don't own our open source plugins, and we release them entirely as-is. While we try to maintain them as much as we can, paying work does (and always will) come first. The code is freely available and anyone is welcome to contribute any patches they have.

          We do have a developer rate (see the bottom table) which you are more than welcome to pay if you wish to commission us to do work ahead of when we would under our own steam. Please note that while the message says we are fully booked till later this year, a couple of hours modifying this plugin could be squeezed in I'm sure.

          If there is interest in us offering professional plugin support packages (and you are the first to shown any), then it may be something we can offer in the future.

      2. May 29, 2008

        Luis Espinoza says:

        Ming You This error  its because DWR don´t find the creator method for you...

        Ming You

        This error  its because DWR don´t find the creator method for your class "SearchDWR", im found some causes in this link:

        http://soaagenda.com/journal/en/articulos/error-dwr-defaultcreatormanager-is-returning-null-for-type-queries/
        In spanish (español): http://soaagenda.com/journal/articulos/error-dwr-defaultcreatormanager-is-returning-null-for-type-queries/\\

        Regards

  17. Mar 30, 2007

    Almar says:

    Hello, Is it possible that an older version of the advanced search plugin will w...

    Hello,
    Is it possible that an older version of the advanced search plugin will work under 2.3?

    thx 

  18. Apr 19, 2007

    Audrey M. Schaffer says:

    Hello, Is it possible to make Advanced Search work with Scaffolding data? For ...

    Hello,

    Is it possible to make Advanced Search work with Scaffolding data? For instance, I have a Scaffold form that allows users to select a country from a list:

    *Country(s):* {list-data:Country|type=check|multiple=true}
    {list-option:Canada}Canada{list-option}
    {list-option:Germany}Germany{list-option}
    {list-data}
    

    Is it possible to have a search checkbox that pulls text specifically tied to a particular scaffolding list, as opposed to just doing a general text search?

    Also, any update on the plugin working with 2.3?

    Thanks!
    Audrey

    1. Apr 19, 2007

      David Peterson [CustomWare] says:

      Scaffolding data is indexed in the search engine, but I'm not sure there is actu...

      Scaffolding data is indexed in the search engine, but I'm not sure there is actually a good way to use that information in Confluence. That is, the syntax required may not be allowed. However, I'm personally not even sure what that syntax is anyway...

      So the answer is "maybe"...

      FYI, each scaffolding data property is indexed using it's name (eg 'Country' in your case). So, if you can figure out how to search on that value, you should be good to go.

  19. May 07, 2007

    Rob Simons says:

    Does the standard search syntax apply for this plugin as described in the conflu...

    Does the standard search syntax apply for this plugin as described in the confluence user guide?

    Here is my problem:

    This query returns the results I expect

    Query: type:( page blogpost ) AND label:( +global?Value1 NOT label:( +global?Value2 ) )
    

    But when I change it to the following, All pages but the one containing Value2 are displayed:

    Query: type:( page blogpost ) AND label:( +global?Value1 OR label:( +global?Value2 ) )
    

    In addition, when I put Value2 first, only the page contiaing value2 is displayed and none containig Value1

    Query: type:( page blogpost ) AND label:( +global?Value2 OR label:( +global?Value1 ) )
    

    Am I constructing the query wrong or does the plugin not support "OR" logic?

  20. May 08, 2007

    imnerdzilla says:

    I would also LOVE to see some functionality that would allow searches to be rest...

    I would also LOVE to see some functionality that would allow searches to be restricted to specific spaces, and sub-sections of heirarchy...

  21. May 25, 2007

    Keith Pimmel says:

    Our development team was able to hobble together a simple patch that appears to ...

    Our development team was able to hobble together a simple patch that appears to get this plugin working under Confluence 2.5.1 and 2.5.2. Caveat emptor in that there are still warning messages showing up in the log files, and some functionality doesn't appear to be behaving properly (see following comment). Anyways, hopefully this will help the community somewhat:

    --- com/adaptavist/confluence/advancedSearch/SearchDWR.java     (revision 7736)
    +++ com/adaptavist/confluence/advancedSearch/SearchDWR.java     (working copy)
    @@ -1,5 +1,7 @@
     package com.adaptavist.confluence.advancedSearch;
    
     +import com.atlassian.bonnie.search.DocumentBuilder;
     +import com.atlassian.bonnie.search.InvertedQueryFilter;
     import com.atlassian.confluence.search.actions.SearchQueryBean;
     import com.atlassian.confluence.search.actions.SearchBean;
     import com.atlassian.confluence.search.actions.SearchResultWithExcerpt;
    @@ -28,8 +30,6 @@
     import org.apache.lucene.search.*;
     import org.apache.lucene.index.Term;
     import bucket.container.ContainerManager;
    -import bucket.search.lucene.DocumentBuilder;
    -import bucket.search.lucene.InvertedQueryFilter;
     import bucket.core.actions.PaginationSupport;
    
     public class SearchDWR {
    @@ -324,8 +324,7 @@
    
             // Perform the Search
             Filter filter = searchQuery.isMailIncluded() ? null : excludeMailFilter;
    -        int[] filteredCount = new int[1];
    -        List permittedEntities = searchBean.search(query, filter, filteredCount);
    +        List permittedEntities = searchBean.search(query, filter);
             List results = (permittedEntities.size() > maxResults ? permittedEntities.subList(0, maxResults) : permittedEntities);
    
             List dwrResults = new ArrayList();
    
  22. May 25, 2007

    Keith Pimmel says:

    Has anyone had any success in using search-select with metadata? We're trying to...

    Has anyone had any success in using search-select with metadata? We're trying to populate pull-down selections from values associated with specific metadataKeys. As an example, suppose we have two pages that have a metadata key called "Threat"; one page has as its value "Missile" while the other has "Antiaircraft Gun". On a different page we have something along the lines of

    {search-form}
    {search-select:query=metadata|metadataKey=Threat}
    {search-submit:Search}
    {search-form}
    
    {search-results:fields=title,author,|sortField=title|sortDir=desc }
    

    We would expect a pull-down box with the options "Missile" and "Antiaircraft Gun" as selectable choices. Are we interpreting the search-select/metadata combination incorrectly?

    Thanks for any insight

  23. Jul 09, 2007

    David Goldstein says:

    yes this plugin appears to be broken for 2.5.1+.  I specifically tested wit...

    yes this plugin appears to be broken for 2.5.1+.  I specifically tested with 2.5.4 and get the same errors noted by others here.  The fix for 2.5.4 (at least) is applying the edits noted above by Keith Pimmel (May 25, 2007 09:19 post).

     Also noticed there's another bug in this plugin that appears to prevent you getting any search results if your query ends up being more than a single object type (e.g. page + blogpost vs. just page or blogpost).  The query it builds – "type:(page blogpost)" – is not a valid query from what I can tell.  It should be "type:(page OR blogpost OR ...)".  The fix for this (if you can rebuild the plugin) is, in SearchDWR.java, search for "Add the types" and change the code to:

                // Add the types
                queryString.append("type:(");
                for (Iterator iter = types.iterator(); iter.hasNext();) {
                     queryString.append(iter.next());                   
                     if (iter.hasNext())
                        queryString.append(" OR ");
                }
                queryString.append(" )");

    And if anyone needs to rebuild this plugin using Maven2, email me if you want a valid pom.xml file -- dgoldstein (AT> leapfrog (dOT> [com]. (Might save you about 4 hours of banging your head against the wall with Maven2) The plugin source hasn't been upgraded to use Maven2.
     

    1. Jul 14, 2007

      Dan Hardiker says:

      This bug occurs only in v2.3 and beyond where the default query concattination o...

      This bug occurs only in v2.3 and beyond where the default query concattination operator has been changed from OR to AND. So where you before searched for "Joe Bloggs" and got articles containing either Joe OR Bloggs, you now only get articles containing Joe AND Blogs.

      I have rolled this fix in to the v1.0.3 release.

  24. Jul 10, 2007

    Guy Fraser says:

    Adaptavist will shortly be starting an upgraded version of this plugin. If there...

    Adaptavist will shortly be starting an upgraded version of this plugin. If there are any specific feature requests (yes, it will work on Conf 2.5.x) please reply here and we'll see if we can squeeze any in.

    1. Aug 23, 2007

      David Dembo says:

      It would be fantastic if you could choose between displaying the results in-li...
      1. It would be fantastic if you could choose between displaying the results in-line, or firing the query to Confluence's standard search page. For example, if you have a page that is acting as a portal, you may not want the results to be displayed anywhere on the page itself, but you might want a user-friendly search interface with check-boxes/drop-menus to include/exclude major labels/spaces/etc. Another advantage of this is that results could subsequently be filtered/refined using the handy links on Confluence's search page.

      2. Some anonymous statistics/tracking would be fantastic - perhaps a report could be made accessible via the Administration console. This would be invaluable - you could see exactly what your users were searching for, and modify labels/locations/layout/interface/search forms/etc to improve the organisation/accessibility of content in your wiki. Some suggestions to get the ball rolling:
        • List of complete search strings and number of times they were used.
        • List of unsuccessful searches (e.g. no results)
        • List of pages/blog posts/etc that were returned by a search, each one expandable to list all queries that caused it to be returned.
        • View statistics at a site level or filtered by individual search forms.
        • I'm sure others can add to this list...

      3. If 2. is implemented, it'd be great if the tracking/statistics could also include searches made via confluence's search page and other search macros.
      4. If 2. is implemented, a nifty feature would also be to have a macro that could be used to supply statistics to other macros (for example the chart macro).

      5. It'd also be great if there were a "live search" mode - e.g. powerful forms with the results returned in an AJAX pop-up similar to the livesearch macro.

        Points 1, 2 and 3 in particular would make this plug-in a force to be reckoned with. Points 4 and 5 would be the decorative icing on the cake.
    2. Dec 07, 2007

      Chris Paquin says:

      Requests for an updated Advanced Search macro: Allow more than one search per...

      Requests for an updated Advanced Search macro:

      1. Allow more than one search per page - I'd love the ability to embed specific searches in cards/decks
      2. Allow radio box controls in addition to check-boxes and drop-downs.
      3. Allow for "OR" functionality
      4. Allow for full-text searching in attachments, too

      Thanks! Chris

  25. Jul 18, 2007

    Brian M. Thomas says:

    I'm doing a search on 2.5.4, and have gotten it down to just window.SyntaxHig...

    I'm doing a search on 2.5.4, and have gotten it down to just

    {search-form}
     {search-input:match=query|type=text}
     {search-submit:Search for Your Issue}
    {search-form}
    

    and the submit button doesn't react. A check of the generated HTML reveals that the button is disabled. In fact, before I remembered to surround the form above with the {code} macro, it generated a disabled button in this comment.

    (Oh, what the heck - why don't I just do it here to prove it?) The identical code, rendered by Confluence:

    Unknown macro: {search-form}
    Unknown macro: {search-input}
    Unknown macro: {search-submit}

    What gives?

    (Note to those who may have seen this comment before I edited it to remove the backslash before the argument separator in the {search-input} invocation: That was placed there by the WYSIWYG editor; to make sure, I previewed it again before saving this time to confirm that the button is stiill disabled.)

    1. Jul 19, 2007

      Brian M. Thomas says:

      A further note:  Since posting this comment, I have seen examples in the ot...

      A further note:  Since posting this comment, I have seen examples in the other comments of what the generated HTML seemed to support, which is placing the button outside the form.  While the document is silent about this possibility - in fact, it says the following (emphasis mine):

      You MUST include a search-submit within the search-form if you wish your users to be able to manually submit the search. If you hide the search form and set it to auto submit, then this is not needed.

      ... I have tried this as well, with no difference in results.  No errors from the parser, but the button is still marked disabled.

      1. Jul 19, 2007

        Brian M. Thomas says:

        Another update: When I render the page with the search form in it, the server l...

        Another update:

        When I render the page with the search form in it, the server logs show the following:

        2007-07-19 08:13:25,478 ERROR [http-80-Processor80] [getaheadplugin.dwr.impl.DefaultCreatorManager] error Creator: 'NewCreator[SearchDWR]' for SearchDWR.js is returning null for type queries.
         -- url: /confluence/plugins/servlet/advanced-search/dwr/interface/SearchDWR.js | userName: bt0008
        2007-07-19 08:13:25,481 ERROR [http-80-Processor80] [[Catalina].[localhost].[/confluence].[servlet-module-container-servlet]] invoke Servlet.service() for servlet servlet-module-container-servlet threw exception
        java.lang.NoClassDefFoundError: bucket.search.lucene.InvertedQueryFilter
                at java.lang.J9VMInternals.verifyImpl(Native Method)
                at java.lang.J9VMInternals.verify(J9VMInternals.java:66)
                at java.lang.J9VMInternals.initialize(J9VMInternals.java:127)
                at java.lang.Class.forNameImpl(Native Method)
                at java.lang.Class.forName(Class.java:130)
                at uk.ltd.getaheadplugin.dwr.impl.SignatureParser.findClass(SignatureParser.java:221)
                at uk.ltd.getaheadplugin.dwr.impl.SignatureParser.findMethod(SignatureParser.java:323)
                at uk.ltd.getaheadplugin.dwr.impl.SignatureParser.parseDeclarationLine(SignatureParser.java:150)
                at uk.ltd.getaheadplugin.dwr.impl.SignatureParser.parse(SignatureParser.java:81)
                at uk.ltd.getaheadplugin.dwr.impl.DefaultConfiguration.loadSignature(DefaultConfiguration.java:454)
                at uk.ltd.getaheadplugin.dwr.impl.DefaultConfiguration.addConfig(DefaultConfiguration.java:94)
                at uk.ltd.getaheadplugin.dwr.impl.DefaultConfiguration.addConfig(DefaultConfiguration.java:66)
                at uk.ltd.getaheadplugin.dwr.AbstractDWRServlet.readFile(AbstractDWRServlet.java:188)
        ... etc.

        1. Jul 19, 2007

          Dan Hardiker says:

          Please confirm you are using v1.0.3 of the plugin.

          Please confirm you are using v1.0.3 of the plugin.

          1. Jul 19, 2007

            Brian M. Thomas says:

            Ah! You beat me to it. Problems connecting to the plugin repository appare...

            Ah! You beat me to it. Problems connecting to the plugin repository apparently kept me from knowing that the plugin was out of date, but I discovered and upgraded it and now all is well.

            So, to be perfectly clear, I was having the problem with version 1.0.2 of the plugin, but after upgrading to 1.0.3 the problem is fixed.

            I was considering deleting my comment but it may be useful for posterity. I'll leave that to your discretion, then, and thanks for your prompt attention.

        2. May 29, 2008

          Luis Espinoza says:

          Brian This error its because DWR can´t find the creator method for your class ...

          Brian

          This error its because DWR can´t find the creator method for your class "SearchDWR", im found some causes in this link:

          http://soaagenda.com/journal/en/articulos/error-dwr-defaultcreatormanager-is-returning-null-for-type-queries/

          In spanish (español):
          http://soaagenda.com/journal/articulos/error-dwr-defaultcreatormanager-is-returning-null-for-type-queries/

          Regards

  26. Jul 25, 2007

    Mohammed says:

    Hi, I am using the following code to search on Metadata using Advanced Search ...

    Hi,

    I am using the following code to search on Metadata using Advanced Search

    {search-form:autoSubmit=false}
      {search-input:type=text\|match=metadata\|metadataKey=Project Name}
      {search-submit:Search}
    {search-form}
    
    {search-results:types=page\|fields=rating,author,title\!Content Title,space\|sortField=rating\|sortDir=desc\|debug=true}
    

    I have the following metadata in one of the pages in the same space: -

    {metadata-list:hidden=true}
    \|\| ProjectName \| Project01 \|
    \|\| Programme Name \| Programme01 \|
    {metadata-list}
    
    

    But the search does not work. It lists down more than 150 pages which contain "Project" in the page body. Whereas there are just two pages with the Metadata "Project Name".

    Can anyone please help. Any help will be highly appreciated.

    Thanks,

    Mohammed

  27. Aug 21, 2007

    Garrett Pence says:

    As stated above, I would find it highly useful to have the capability of searchi...

    As stated above, I would find it highly useful to have the capability of searching attachments as well as pages/blogs. Would this be something difficult to include in this plugin? Thanks!

  28. Sep 20, 2007

    Louise Graham says:

    Hi I would like to use the advanced search macro to search the titles and ...

    Hi

    I would like to use the advanced search macro to search the titles and actual content of pages. I am trying to search all content for a specific word, I want the results displayed in order of rating, and I want to have the rating displayed if it has been rated once or more.
    Here is the search form I have created:

    {search-form:autoSubmit=false\|hidden=false}
    {search-input:match=query\|type=text}
    {search-submit:Search}
    {search-results:fields=title,rating,author\|rateThreshold=1\|sortField=rating\|sortDir=desc}
    {search-form}
    


    When I enter content to search on, an IE error is displayed stating "Null".

    However if I replace the query with label, it works, however it only returns pages where labels have been added. I want the title and content to be searched.

  29. Jan 17, 2008

    Kyle says:

    I am trying to create a search to search a wiki page and its childpages (all are...

    I am trying to create a search to search a wiki page and its childpages (all are in the same space). Is this possible? For the life of me I have been going nuts trying to figure this out. Each time I try to serach, it searches the entire space. My company has multiple spaces, and I am creating wiki pages for "MyCompanySpace" which has a ton of organized departments, and I want a search that will search a specific child page and all of its children.

     Please help! I've been at this for days.

    - kyle

  30. Jan 17, 2008

    flau3388 says:

    Hi, I am new to this. How do I create a meta data in a wiki page so that I can...

    Hi,

    I am new to this.

    How do I create a meta data in a wiki page so that I can use the Search to find the page back?

    Can someone give me an example? Thanks.

    Regards,

    Frankie 

  31. Jan 28, 2008

    Ken Robertson says:

    Is there any way to get the date of the latest attachment added to a space as a ...

    Is there any way to get the date of the latest attachment added to a space as a search-results property?

  32. Jan 31, 2008

    Darren D says:

    I am sure I am overlooking something obvious...but how do I limit this to search...

    I am sure I am overlooking something obvious...but how do I limit this to search only within a single space?

    It doesn't seem to support "spacekey=X" which would be nice.

    We want users of a certain space to have the search box front and center, and to have it only search that space.

    Any suggestions?

  33. Feb 02, 2008

    Matt Bovett says:

    I'll be helping run a wiki with about 600 internal users, and I'm trying to get ...

    I'll be helping run a wiki with about 600 internal users, and I'm trying to get things like the news search working and such.

    I'd also like to be able to limit the search to a single space.

    Is there any workaround for this if this functionality isn't available yet? Maybe using labels? Can I limit the search to just search news posts with certain labels on them? Any ideas?

    Thank you very much in advance!

  34. Feb 04, 2008

    Jim Barrick says:

    Does anyone know where the where the markup lives for Advanced Search panel that...

    Does anyone know where the where the markup lives for Advanced Search panel that is used for 2.7x?  I'd like to shut of quicksearch() and use a modified version of Advanced Search embedded in space home pages instead. 

    BTW Matt ---

    I tried to limit confluence searches to  current space using the following trick:

    http://confluence.atlassian.com/display/DISC/Limit+quick+search+to+current+space

    Problem is that while this works, the bottom of the search results unhelpfully offer to display results from other spaces.  Not great if you're trying to firewall spaces from each other... 

    1. Feb 05, 2008

      Matt Bovett says:

      ThemeBuilder lets you turn that off I made an Apple-style search field that se...

      ThemeBuilder lets you turn that off

      I made an Apple-style search field that searches only my space. It only looks Apple-style in Safari.

      Code:

      {html}
      <form method="get" class="confluence-searchbox" action="/req.contextPath/dosearchsite.action"><input type="hidden" name="searchQuery.spaceKey" value="enterspacekeyhere" /><input type="search" name="searchQuery.queryString" autosave="enteruniquename" results="10" name="enteruniquename" placeholder="Search This Space..." style="color: #000000; width:195px; font-size: 15px; margin:0px 0px 0px 0px;"/></form>
      {html}
      

      The reason why I'm here is to try to find out if anybody knows how to make this Advanced Search plugin use that cool looking Apple-style search field. I tried but I couldn't figure out how to get the search field to pass the query to the plugin.

      Anybody have any clue?

      Matt

      1. Feb 18, 2008

        Matt Bovett says:

        So nobody knows how to make the Advanced Search plugin use the cool looking Appl...

        So nobody knows how to make the Advanced Search plugin use the cool looking Apple-style search field?

        I tried but I couldn't figure out how to get the search field to pass the query to the plugin.

        Anybody have any clue?

        Matt

  35. Feb 06, 2008

    Markus Stuebing says:

    I am a bit confused about using AND OR and NOT. I tried the following: I am lo...

    I am a bit confused about using AND OR and NOT.

    I tried the following:

    I am looking for results labeled with "es,high" oder "pt,high":

    {search-input:type=text|match=label|value=high AND label:(+global?es OR label:(+global?pt)}
    

    But I do not get any results. What's wrong? 

    Debug shows: Query: type:( page OR blogpost ) AND label:( +global?high AND label:(+global?es OR label:(+global?pt) )
    

    We are using Confluence 2.7.1

    1. Feb 07, 2008

      Markus Stuebing says:

      I found the solution: window.SyntaxHighlighter.config.clipboardSwf = '/s/1724...

      I found the solution:

      {search-form:autoSubmit=true\|hidden=true}
      {search-input:type=text\|match=label\|value=pt OR label:(+global?es)}
      {search-input:type=hidden\|match=label\|value=high}
      {search-submit:Search}
      {search-form}
      
  36. Feb 07, 2008

    Markus Stuebing says:

    But how can I restrict the results to "modified within last 7 days" ?

    But how can I restrict the results to "modified within last 7 days" ?

  37. Feb 08, 2008

    john futcher says:

    I'd like to be able to sort on the relative importance.  By which i mean, i...

    I'd like to be able to sort on the relative importance.  By which i mean, if i have two pages called Fred and Joe, and

    they are brothers so within their text they contain their brother's name.  So the page called Fred contains the word Joe

    and the page called Joe contains the word Fred.

    Currently when i search for Joe, i get results- Fred and Joe sorted in that order, but i want the Joe page to appear first

    because the match on the page name is "obviously" more important than a match at the text level.

    I dont think i can rate the page, because that wouldn't rate the page in the page's context, the Joe page is a "5" for Joe

    but only a "3" for "Fred".

    Any ideas?

  38. Feb 08, 2008

    Sean V says:

    Definitely need the ability to restrict search to a specific space. This was moo...

    Definitely need the ability to restrict search to a specific space. This was mooted around a year ago. Any plans to implement?

  39. Feb 14, 2008

    Markus Stuebing says:

    Does really nobody know how to restrict search results to "lastModified:lastweek...

    Does really nobody know how to restrict search results to "lastModified:lastweek" or "lastModified:7d" ?

    I really need this - this was given in "search macro" but I did not find something like this for "advanced search macro"?!

    Please help me!

  40. Feb 14, 2008

    Markus Stuebing says:

    I need to show multiple search results on one page. My idea was to add the sear...

    I need to show multiple search results on one page.

    My idea was to add the search macros each on one single page and to build up another page with the include macro,

    but only the first page performs the search query.

    The others do not show anything - although they show results if I open those pages separately.

    Any idea?

  41. Feb 28, 2008

    Craig Fox says:

    When I type in the basic examples, I get a popup saying Input(username) is null....

    When I type in the basic examples, I get a popup saying Input(username) is null.  See last couple lines of log below.  It shows my username cfox570 then says it is null. ideas? 


    2008-02-28 14:33:27,797 WARN [http-8080-Processor1] [getaheadplugin.dwr.impl.DefaultExecProcessor] warn Erroring: id[4922_1204227207644] message[uk.ltd.getaheadplugin.dwr.OutboundVariable@e851b9]
    2008-02-28 14:33:46,886 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.DefaultConverterManager] warn Missing type info for doSearch(0<0>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml
    2008-02-28 14:33:46,891 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.DefaultConverterManager] warn Missing type info for doSearch(1<0>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml
    2008-02-28 14:33:46,895 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.DefaultConverterManager] warn Missing type info for doSearch(2<0>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml
    2008-02-28 14:33:46,898 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.DefaultConverterManager] warn Missing type info for doSearch(2<1>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml
    2008-02-28 14:33:46,902 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.DefaultConverterManager] warn Missing type info for doSearch(3<0>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml
    2008-02-28 14:33:46,905 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.DefaultConverterManager] warn Missing type info for doSearch(4<0>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml
    2008-02-28 14:33:46,961 WARN [http-8080-Processor2] [getaheadplugin.dwr.impl.ExecuteQuery] warn Method execution failed:
     -- url: /plugins/servlet/advanced-search/dwr/exec/SearchDWR.doSearch.dwr | userName: cfox570
    java.lang.IllegalArgumentException: Input (username) is null.

  42. Mar 14, 2008

    George Crum says:

    Has anyone successfully limited the Advanced Search plugin to a single space? I...

    Has anyone successfully limited the Advanced Search plugin to a single space?

    If so...

    1. Is it possible to exclude spaces in searches?
    2. Search actual content of pages under the home page of a space?

    Here is what I have tried so far:

    {search-form}
      {search-input:type=text|match=query}
      {search-input:type=hidden|match=spaceKey|value=spacename}
      {search-submit:Search}
    {search-form}
    
    {search-results}
    

    This still pulls up pages from other spaces.

    1. Mar 16, 2008

      David Page says:

      I have been reading about this myself recently. You want to use a lucene query. ...

      I have been reading about this myself recently. You want to use a lucene query. Try including this:

      {search-input:type=hidden|match=query|value=spacekey:yourspacename}
      

      So you have:

      {search-form}
        {search-input:type=text|match=query}
        {search-input:type=hidden|match=query|value=spacekey:yourspacename}
        {search-submit:Search}
      {search-form}
      
      {search-results}
      

      You can find more information here as well: http://confluence.atlassian.com/display/CONF26/Confluence+Search+Fields

      I hope this helps!

      1. Mar 17, 2008

        George Crum says:

        Hi David, This works perfectly and also makes sense how it works now.  Tha...

        Hi David,

        This works perfectly and also makes sense how it works now.  Thank you for this bit of information and the link too!

  43. Mar 17, 2008

    JU says:

    How is it possible to search only in titles or only for labels? Thanks.

    How is it possible to search only in titles or only for labels? Thanks.

  44. Mar 31, 2008

    Chris Paquin says:

    If I have the Pagetree Searchplugin enabled, is there an easy way to embed the p...

    If I have the Pagetree Searchplugin enabled, is there an easy way to embed the pageid into the Advanced Search search-input parameter? I can already code the value, but this would be pretty darn tedious to do on every page where I wanted to use this functionality.

    For example, this works:

    {search-form}
      {search-input:type=text|match=query}
      {search-input:type=hidden|match=query|value=ancestorIds:1966097}
      {search-submit:Search}
    {search-form} {search-results}
    

    but THIS doesn't:

    {search-form}
      {search-input:type=text|match=query}
      {search-input:type=hidden|match=query|value=ancestorIds:$content.getId()}
      {search-submit:Search}
    {search-form} {search-results}
    

    TIA! Chris

    1. Apr 18, 2008

      Chris Paquin says:

      I ended up using the Replace and Render macro for this. window.SyntaxHighligh...

      I ended up using the Replace and Render macro for this.

      {search-form}
      {search-input:type=text|match=query}
      {replace-and-render}
      {replace-body}{search-input:type=hidden|match=query|value=ancestorIds:%pageid%}{replace-body}
      {replace-item:%pageid%}{pageid}{replace-item}
      {replace-and-render}
      {search-submit:Search}
      {search-form} {search-results}
      

      Where {pageid} is a user macro that consists of

      $content.getIdAsString()
      

      Another way to do this is to use a user macro. I created one called {ancestorsearch} that consists of this wiki markup:

      {search-input:type=hidden|match=query|value=ancestorIds:$content.getIdAsString()}
      

      And then used it in the Advanced Search parameters as such:

      {search-form}
      {search-input:type=text|match=query}
      {ancestorsearch}
      {search-submit:Search}
      {search-form} {search-results}
      

      FWIW, it would be great if page information (pageids, labels) could be used in Advanced Search natively. Users love the dynamic results.

  45. Apr 17, 2008

    David Keene says:

    Great tool, any chance you would consider adding a clear button next to the subm...

    Great tool, any chance you would consider adding a clear button next to the submit button or option of.

    Keep up the good work

    Regards

    Dave

  46. May 16, 2008

    Matt Bovett says:

    Instead of this format: 13 May 2008 Is there any way to make this plugin use t...

    Instead of this format: 13 May 2008

    Is there any way to make this plugin use this format for the Date Modified column?: 05/13/08

    I would think the plugin would use the format defined in the Confluence configuration defined in the administration console, but I guess not?

  47. Jun 25, 2008

    Jeff Schnitter says:

    Great plugin. How difficult would it be to add support for searching the same t...

    Great plugin.

    How difficult would it be to add support for searching the same types as the global Confluence search? Currently, the Confluence search has support for these additional types that this plugin does not: comments, attachments, mail.

    Glancing at the post from David Goldstein (Jul 09, 2007) above that references SearchDWR.java, it looks like it would be pretty easy. If this is correct, please add support for searching comments, attachments and mail too.

    Thanks!

  48. Jul 17, 2008

    Chris Paquin says:

    Would it be possible to add a "target" parameter? Our users LOVE this macro, but...

    Would it be possible to add a "target" parameter? Our users LOVE this macro, but don't like the necessity of clicking the back button to get back to the original search screen (and having their parameters reset). Something like a "|target=_blank" would allow us to launch the results in another window. Another thing that would be very helpful would be allowing for "uselayout" functionality, so I could have the content pop up in a special mode without menus, etc.

    Thanks!! Chris

  49. Jul 25, 2008

    philippe says:

    Great piece of work. I´m trying to display all pages of one specific user. (btw...

    Great piece of work.

    I´m trying to display all pages of one specific user. (btw. does anybody know another way to do that?)

    I tried this:

    {search-form}
     {search-input:type=text|match=query|value=username:admin}
    {search-submit:Search}
    {search-form}
    {search-results:debug=true}
    

     
    Result:

    Query: ( type page OR  blogpost ) AND ( username:admin )
    

    But nothing is shown.

    But If I type  username:admin  into the search box in the upper left corner I get the list with all pages of user admin.

    Any ideas? 

    Thanks

    philippe

  50. Aug 26, 2008

    Rafael Cerioli says:

    Hello, I'm having the same bug as Craig Fox : When I search for some words (it...

    Hello,

    I'm having the same bug as Craig Fox :

    When I search for some words (it's seems to happen randomly !), I've got a popup with " Input ( username ) is null".

    I see  "Please Wait: Searching" but nothing happens...

    Thank you

    1. Oct 01, 2008

      Greg Hodgkinson says:

      I have the same problem. We are using Confluence 2.9.

      I have the same problem. We are using Confluence 2.9.

  51. Oct 10, 2008

    Thom W Gray says:

    Greetings! This is working great for us, except that "unrated" is returned in t...

    Greetings!

    This is working great for us, except that "unrated" is returned in the Rating column on all results rows – even for pages with ratings. The syntax I'm using is as follows:

    {search-form:autoSubmit=true|hidden=true}
      {search-input:type=hidden|match=label|value=pmgreading}
      {search-submit:Search}
    {search-form}
    {search-results:showExcerpts=false|rateThreshold=1|maxResults=50|fields=rating,title,creation,author|sortField=creation|sortDir=desc}

    We're on version 2.9.1415 of Confluence and are using version 1.0.4 of the Advanced Search plugin. Also using version 2.0.2 of the Rate macro. Any thoughts?

    1. Oct 10, 2008

      philippe says:

      Hello, this is working as well on our confluence (2.9 Build 1415). BUT: If I c...

      Hello,

      this is working as well on our confluence (2.9 Build 1415).

      BUT: If I change the code to search for username (instead of label - in your case), the problem is still there.

      {search-input:type=text|match=query|value=username:admin}
      
  52. Oct 13, 2008

    matthew watkinshar says:

    Any way to search multiple Spacekeys within a single query? Thanks!


    Any way to search multiple Spacekeys within a single query?

    Thanks!


  53. Dec 04, 2008

    Stefano Ferrante says:

    Hello i'm trying to use this plugin for my confluence installation and i downloa...

    Hello i'm trying to use this plugin for my confluence installation and i downloaded the source code to modify the look and feel results's table .
    But i got some problems about configuring the project on my eclipse IDE and using maven2 to download the dependencies.

    Some classes can't be found in any jar of installed or downloaded :

    import com.atlassian.confluence.renderer.WikiStyleRenderer;
    import com.atlassian.confluence.renderer.radeox.macros.ExcerptMacro;

    those 2 imports are wrong .
    I downloaded the jar too, and uplodaded on my confluence and seem to work properly.

    anyone got the same problem with confluence 2.9.x?

    any suggestion for a fix or where i can download the .jar needed?

    thanks in advance.

    1. Dec 15, 2008

      Yao Ge says:

      I have the same issues with 2.9.x with jar file I downloaded. I can not get it t...

      I have the same issues with 2.9.x with jar file I downloaded. I can not get it to work in 2.10 either.

    2. Jan 07, 2009

      Gene Willman says:

      We have recently upgraded to 2.9.2 and now we are getting .com.atlassian.conflue...

      We have recently upgraded to 2.9.2 and now we are getting .com.atlassian.confluence.renderer.wikistylerenderer error within IE.

    3. Feb 02, 2009

      Keith Brophy says:

      Hi Stefano, I have updated the source and jar (version 1.0.5) for Confluence 2....

      Hi Stefano,

      I have updated the source and jar (version 1.0.5) for Confluence 2.9 / 2.10 compatibility.

      Please let me know if this version works successfully for you.

      Regards,
      Keith

  54. Jan 15, 2009

    Manoj says:

    hi, i have the following search options on a page. window.SyntaxHighlighter...

    hi,

    i have the following search options on a page.

    {search-form}
      {search-input:type=text|match=query} {search-submit:Search}
    
    {search-input:type=checkbox|match=label|value=label1} label1
    {search-input:type=checkbox|match=label|value=label2} label2
    {search-input:type=checkbox|match=label|value=label3} label3
    {search-input:type=checkbox|match=label|value=label4} label4
    {search-form}
    
    {search-results:types=page| debug=true}
    

    actually i want to search pages with various labels assigned to them like label1,label2 etc.
    when i select the check boxes for multiple labels .. this macro does an "AND" of all the label instead of doing "OR". is there a way i can implement ORing here so that i can search multiple pages with different labels.


    manoj

    1. Feb 24, 2009

      Randy Mysliwiec says:

      By the note above it used to search with "OR." Like manoj, I'd like to get ...

      By the note above it used to search with "OR." Like manoj, I'd like to get it to search with "OR" again.  Any ideas on how?

  55. Feb 10, 2009

    cyrille martin says:

    Hi, Does anyone have succeeded to filter metadata in the search form (Conf. 2.1...

    Hi,

    Does anyone have succeeded to filter metadata in the search form (Conf. 2.10; Adv. Search 1.0.5) ? like this

    {search-form:autoSubmit=true}
    {search-input:type=hidden|match=metadata|metadataKey=PageNumber|value=1}
    {search-form}
    {search-results:fields=title}
    

    Assuming of course that a page in the space includes

    {metadata:PageNumber}1{metadata}
    or

    {metadata-list}
    || PageNumber| 1 |
    {metadata-list}
    1. Feb 10, 2009

      cyrille martin says:

      Concerning my problem, I finally succeed by upgrading the plugin Metadata 1.6 to...

      Concerning my problem, I finally succeed by upgrading the plugin Metadata 1.6 to Metadata 2.10.

      Now it is working.

  56. Feb 11, 2009

    Stefan says:

    Hi, is there a timeline for the new Advanced Search Plugin 2? Im curious of th...

    Hi,

    is there a timeline for the new Advanced Search Plugin 2?

    Im curious of the new features!

  57. Feb 24, 2009

    Randy Mysliwiec says:

    Any way to make the search results open in a new window or page?

    Any way to make the search results open in a new window or page?

  58. Mar 13, 2009

    Chris Paquin says:

    We're testing Confluence v2.10.2, and can't seem to get Advanced Search to work ...

    We're testing Confluence v2.10.2, and can't seem to get Advanced Search to work at all. Even "basic" invocations throw this error: "Missing method or missing parameter converters: SearchDWR.doSearch"

    Never mind! I forgot to restart the server after upgrading from Advanced Search v1.04 to v1.05.

  59. May 11, 2009

    Chris Paquin says:

    In v1.04 and v1.05 (at least...maybe before), if you DON'T have the "Adaptavist ...

    In v1.04 and v1.05 (at least...maybe before), if you DON'T have the "Adaptavist Rate Macro" enabled, Advanced Search will still try to load the following resources, with 404 results.

    mywiki/download/resources/com.adaptavist.confluence.rate:rate/gfx/builder/grad_stars.gif

    mywiki/download/resources/com.adaptavist.confluence.rate:rate/gfx/builder/grey.gif

    Would it be possible to eliminate that dependency, especially since it the Rate Macro appears to have been partially deprecated?

  60. May 19, 2009

    huhadhac says:

    How many pages using a given plugin? Can i write a search with this plugin that...

    How many pages using a given plugin?

    Can i write a search with this plugin that can give an output like this:

    Plugin name: Number of pages using this Plugin: A list of those Pages:(Optional, would be only nice to have)
    Scaffolding Plugin 326 Web team, Martha Singer's Home, Tyler Durden's Home...
    Podcasting Plugin 42 Chuck Norris facts page, HR-s page, Facility-s page...
    ...
    ...
    ...

    Atlassian support could not help.
    They suggested the "Global Search and Replace Plugin". But it is only a beta and it did not worked on our 2.7.1 Confluence.
    I have a large site with X thousand pages and Y thousand users and I need to figure out what pages are using what plugins because we're doing a 2.7.1->2.10 upgrade.
    What's the best way to get this information on a system with this size?

    1. Jul 10, 2009

      David Hergert says:

      I would like to search on this as well .... like to be able to search for " Unkn...

      I would like to search on this as well .... like to be able to search for "

      Unknown macro: {mymacro}

      " and have it find all places where that occurs. 

  61. Jun 24, 2009

    Chris Paquin says:

    Can I get some clarification on the version compatibility of the Advanced Search...

    Can I get some clarification on the version compatibility of the Advanced Search macro? Here (this page) it lists v1.0.5 as being compatible with v2.10 of Confluence, and that's also mentioned in its notes. However, the Plugin Exchange (https://plugins.atlassian.com/plugin/details/146 and https://plugins.atlassian.com/plugin/matrix/146) states that v1.0.4 is the right version to use for v2.10, and that v1.05 is incompatible...

    Which is it?

    Thanks...Chris

  62. Jul 07, 2009

    Greg Miller says:

    Does anyone have advice on how to compile this with Maven2? When I try to compi...

    Does anyone have advice on how to compile this with Maven2?

    When I try to compile - I'm getting this error:

    
    [INFO] [compiler:compile]
    [INFO] Compiling 9 source files to /users/jon/svn/1.0.5/target/classes
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Compilation failure
    /users/jon/svn/1.0.5/src/main/java/com/adaptavist/confluence/advancedSearch/SearchUtils.java:[3,-1] cannot access com.atlassian.confluence.setup.BootstrapManager
    bad class file: /users/jon/.m2/repository/com/atlassian/confluence/confluence/2.9.2/confluence-2.9.2.jar(com/atlassian/confluence/setup/BootstrapManager.class)
    class file has wrong version 49.0, should be 48.0
    
    1. Jul 08, 2009

      Keith Brophy says:

      Hi Greg, This error relates to the version of JDK being used to compile the plu...

      Hi Greg,

      This error relates to the version of JDK being used to compile the plugin.

      It would seem that the Confluence jar you are using was compiled using JDK 1.5 while the plugin is attempting compilation via JDK 1.4.
      Are you using a standard Confluence jar?

      Is
      Cheers,
      Keith

  63. Jul 10, 2009

    Robert Landsberger says:

    Hi there, we are currently evaluating the use of confluence for our not IT exci...

    Hi there,

    we are currently evaluating the use of confluence for our not IT excited staff and therefore testing our confluence as a simple database front end. This is easy to implement via scaffolding and template based editing. However we are yet unable to figure out some essential functionalities.

    Though we can search for any scaffold data with the advanced search plugin, we would like to search for

    {date-data}

    as well and ideally in terms of 'earlier then DATE' via a drop down menu.

    And secondly is there a way to list the scaffold data in the search results. Meaning could we list data other than the five predefined fields?

    A solution and your help is highly appreciated.

    Best,

    Robert

  64. Jul 29, 2009

    Alberto says:

    Hi , is possible find a "label" and text in the actual page and your child? can ...

    Hi , is possible find a "label" and text in the actual page and your child? can the search display the name of page and not the name of attach?

    Thanks

  65. Nov 06

    Dan Feeley says:

    Greetings, Just finished banging my head against the wall and finally came to t...

    Greetings,

    Just finished banging my head against the wall and finally came to the conclusion that when you specify to search for metadata using the "metadataKey", the metadata key cannot contain spaces. So as an example:

    Works {search-select:match=metadata|metadataKey=SomeMetadataKey}
    
    Doesn't Work {search-select:match=metadata|metadataKey=Some Metadata Key}
    


    I was able to reproduce this across several metadata keys that contained spaces vs. without spaces. Anyone else run into this?

    Using confluence 3.0.1 and 1.0.5 on the plugin