1.1.8. Search

Warning

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:

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:

PreferencesDescriptionDefault value for Unified SearchDefault value for Quick Search
resultsPerPage Number of results per page. 105
searchCurrentSiteOnly Searches only in the current site if true, or all sites if false. falsetrue
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. allall
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. falsefalse
hideFacetsFilter Shows/hides the filters. falsefalse

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>
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus