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".

AdministerWikiMenu.png

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

DisableSearchSuggestion.png

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

DisableSearchSuggestionStep2.png

Search Suggest Engine

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

SolrBasedSuggest.png

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.

DocumentNamesSource.png

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:

fq=type:DOCUMENT
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:

NewSourceEdit.png

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

NewSourceAdd.png

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

NewSourceSuggestionBox.png

Delete a Search Suggest Source

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

NewSourceAdd.png

and confirm.

DeleteSourceConfirm.png

    

Related Pages

Search this space

 

Most popular tags

Failed to execute the [groovy] macro
  1. access rights
  2. activity stream
  3. annotation
  4. attachment
  5. comment
  6. Document Tree Macro
  7. export
  8. Extension Manager
  9. Flamingo skin
  10. global user
  11. Groovy event listener
  12. group
  13. nested page
  14. search
  15. skin
  16. syntax
  17. user
  18. user profile
  19. velocity macros
  20. wiki
  21. wysiwyg
  22. XWiki Applications
  23. xwikiattachment_archive table
  24. xwikiattachment table
  25. xwikiattrecyclebin table
  26. xwikiproperties table

[Display all tags from this space]