General Actions:
To access the Search administration UI, click the button in order to open the drawer menu, then click on "Administer Wiki".
In the wiki preferences page, click on "Search" -> "Search" in the accordion menu to the left.
The default XWiki search engine is Solr, but you may also pick "Database".
Solr is the default XWiki Standard search engine based on Apache Solr which has its own index. The default folder that stores the Solr index is <permanent folder>/solr but you can change it by adding the property search.solr.home to the file "WEB-INF/xwiki.properties".
The SOLR search module automatically indexes the changes made on the wiki and at each startup a background job checks if the Solr index and the database are synchronized. If not, the job only applies the updates. Also, entities are now indexed with the list of supported locales, which means that if your current locale is "fr_FR" you will find all entities that you would have seen when the current locale is "fr_FR".
The manual indexing is still available because it is more stable so, in order to perform it, go to the "Solr search administration" section, choose the action you wish to perform:
The selected action will apply on the entire farm or on a sub-wiki of your choice.
In case you wish to limit the pages that will be affected by the selected action, you can use a custom HQL or XWQL query.
After clicking on "Apply" to trigger the index, you will see a confirmation message.
The actual reading of wiki pages and their indexing is done in a safe background thread and in the "Queue Size" section you can see the number of entities that are left to be indexed, re-indexed or deleted from the index.
You can now debug the Solr search query string by adding &debug=true to the "Main.SolrSearch" URL query string. For instance, we are looking for the word "activity" in all the wiki pages. The search URL will then be like
/xwiki/bin/view/Main/SolrSearch?f_type=DOCUMENT&text=activity&f_locale=en&f_locale=&r=1&debug=true
and will display:
You can now restrict the list of wikis that are searchable by default from the main wiki by defining the following Velocity variable in a page that includes "Main.SolrSearch":