1.1.1.8. Search

eXo Platform provides with the Unified Search feature that 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:

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

There are some preferences that change the search scope and show/hide the UI forms.

The Unified Search portlet uses the following preferences:

resultsPerPage Number of results per page.
searchCurrentSiteOnly Search only in the current site if true, or all sites if false.
searchTypes Limits the search scope to some index types (such as wiki, document).
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=lorem&types=all.
hideFacetsFilter Shows/hides the filters.

The two last preferences are not used by the Quick Search portlet.

Here is the sample configuration for the Unified Search portlet:


<portlet-preferences>
    <preference>
        <name>resultsPerPage</name>
        <value>10</value>
    </preference>
    <preference>
        <name>searchTypes</name>
        <value>all</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>

For searchTypes, you can use the following values (comma-separated):


    <preference>
        <name>searchTypes</name>
        <value>file, document, wiki, page, post, people, space, event, task, answer</value>
    </preference>
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus