Search Suggest Sources

Access the Search Suggest Administration

To access the search suggest UI, click the DrawerMenuIcon.png button to open the drawer menu, then click on "Administer wiki".


In the wiki administration page, click on "Search" -> "Search Suggest" in the accordion menu to the left.


To disable the search suggest, choose "No" in the drop-down list then click on "Save".


Search Suggest Engine

The search suggest is using the Solr engine by default and we have created a dedicated search suggest service. 


By default, the search is done in:

  • the name of the page
  • the content of the page
  • the name of the attachment
  • the content of the attachment
  • user name
  • blog post
  • wiki

Edit a Search Suggest Source

To modify a search suggest source just click on it and an edit form will open. If you choose to edit for instance "Page names", you should see the image below.


The form displays the suggest source information such as:

  • the name represented by a translation key
  • the search engine to use when retrieving results
  • the search suggest service
  • the query passed to the search suggest service
  • the maximum number of search results taken from the current source with "3" as default value
  • the icon used to mark the search results
  • whether the searched text will be highlighted in the search suggest results
  • whether the current suggest source is used or not; note that this option is taken into account provided the source search engine matches the search engine used by the current wiki

You can now specify more advanced search parameters in the search query and they will be passed directly to the search engine. For instance, the old (title:__INPUT__* OR name:__INPUT__*) AND type:DOCUMENT query can now be written as:

qf=title^2 name

The main advantages are:

  • the query filter is the same for all search request made to the current Search Suggest source because it is cached by Solr
  • the ability to specify the boost for each field 
  • if not specified, the __INPUT__ is still used by default 

Backwards compatibility with existing Solr Search Suggest sources is still preserved. More information about the commons query parameters are available in the "Solr Schema and API" documentation page which is listed in the "Related Pages" section.

After you have made your changes, don't forget to click on the "Save" button. If on the contrary you don't need to edit the suggest source anymore, click on its name to collapse the form. 

Add a Search Suggest Source

To add a search suggest source, click on the "Add a new source" link which will open the creation form. Supposing that you want to search in the page title but without displaying the results from the spaces "Admin", "XWiki" or from any space beginning with "Doc" and "Lib", the form would look like in the image below:


Click on "Save" after you are done, refresh the page and the new source will be displayed in the "Solr" tab.


If you then search for any term, you will see the new "Page Title" section in the suggestion box.


Delete a Search Suggest Source

To delete a search suggest source, just hover it, click in the red "X" icon


and confirm.



Related Pages

Trying to decide between Cloud and On Premise? See the comparison on the XWiki Help Center.

Search this space