You are looking at documentation for an older release. Not what you want? See the current release documentation.
eXo Platform provides with the Unified Search feature which allows users to search for any types of content stored in the content repository.
The Unified Search feature is implemented by using three following portlets:
The Quick Search portlet which allows users to quickly search for content from the top navigation bar.
The Unified Search portlet which allows users to search for content with their desired filters.
The Search Administration portlet which allows administrating the unified search engine.
Package
These portlets are packaged in the
unified-search.war
file.
Portlet
See the
portlet.xml
file in the project by following this path:
webapps/unified-search/WEB-INF/portlet.xml
Search portlets preferences
The Unified Search and Quick Search portlets use some preferences that change the search scope and show/hide the UI forms:
Preferences | Description | Default value for Unified Search | Default value for Quick Search |
resultsPerPage | Number of results per page. | 10 | 5 |
searchCurrentSiteOnly | Searches only in the current site if true, or all sites if false. | false | true |
searchTypes | Limits the search scope to some index types (such as wiki, document); in case there is no type which should be limited, use all value. | all | all |
hideSearchForm | Shows/hides the text box (where users enter the keyword). If true (hide), users can search by entering the keyword in URL, for example /search?q=home&types=all. | false | false |
hideFacetsFilter | Shows/hides the filters. | false | false |
Note that the two last preferences are not set in the portlet.xml
file, but still have default values as indicated. Besides, all the above preferences are at global scope. That is, if any administrator changes any search setting of these portlets, either at runtime or via custom extension, the new setting will be applied for all users and available sites.
Here is a sample configuration for the Unified Search portlet:
<portlet-preferences>
<preference>
<name>resultsPerPage</name>
<value>10</value>
</preference>
<preference>
<name>searchTypes</name>
<!-- remove the value you don't need -->
<value>file, document, wiki, page, post, people, space, event, task, answer</value>
</preference>
<preference>
<name>searchCurrentSiteOnly</name>
<value>false</value>
</preference>
<preference>
<name>hideSearchForm</name>
<value>false</value>
</preference>
<preference>
<name>hideFacetsFilter</name>
<value>false</value>
</preference>
</portlet-preferences>
and for the Quick Search portlet:
<portlet-preferences>
<preference>
<name>resultsPerPage</name>
<value>5</value>
</preference>
<preference>
<name>searchTypes</name>
<!-- remove the value you don't need -->
<value>file, document, wiki, page, post, people, space, event, task, answer</value>
</preference>
<preference>
<name>searchCurrentSiteOnly</name>
<value>true</value>
</preference>
</portlet-preferences>