Unified Search Across eXo Platform 4 Applications
eXo has always had powerful search capabilities. Every application has both a simple search and an advanced search.
While this approach is very efficient within an application, it falls short when you want to search more broadly across different applications. Most of the time, switching to the right application before you can search is the one irritating thing that holds you back from accessing your content.
So, in Platform 4.0, we addressed this problem by introducing a single and always accessible place to search for your stuff.
Quick Search
To make searching accessible from anywhere, we added a small search icon to the top navigation bar. Click on it and a text field will appear, where you can enter any search term.
To save on key strokes, we start to display results instantly and refresh them as you type. Quick results are grouped by type and sorted by relevancy.
If you remember only part of the name of a document, a page or a person, start by typing what you remember and the result will appear after just a few key strokes. To view the content, highlight the result entry and hit <Enter>. You will be taken to the right application with the content open.
Search Results
Quick search should do the job 80% of the time. However, sometimes you need to refine your search further. Click on See All Search Results at the bottom of the quick search results and it will take you to the search results page.
There, you will be able to refine your search thanks to the various filtering and sorting options.
On the left, the Filters box allows you to narrow the scope of your search to one or more sites.
You can also restrict the results to one or more types and sort by title or date.
Settings
The unified search can search broadly in the platform, but you may not want to activate all search connectors. Admins can go to Administration > Content > Search and disable any connector that they don’t want to use. This will instantly let the unified search engine exclude results from this connector.
Instead of globally disabling connectors at the engine level, you may want to build your own search pages, preconfigured to search a specific scope and with filters. To do this, just open the app in edit mode and configure your defaults.
You will also be able to select the number of results per page and hide elements.
These settings can also be configured in xml as portlet preferences for the search and quick search portlets.
Search API
The search engine exposes a simple REST endpoint that lets your developers programmatically run custom searches rather than relying on the search interface.
Here is an example search query:
/search?q=powers&types=file&site=acme&offset=2&limit=10&sort=date&order=desc
The output is in the JSON format:
{ "file": [ { "date": 1375398869493, "detail": "Managed Sites - 147,8 KB - Friday, August 2, 2013 1:14 AM", "excerpt": "<div><span>RATP How to use super <strong>powers</strong> safely in urban areas. Le métro de paris How to join us en root ...</span></div>", "fileType": "FileDefault nt_file applicationpdf", "imageUrl": "https://localhost:8080/rest/thumbnailImage/medium/repository/collaboration/sites/acme/documents/metro.pdf", "relevancy": 2368, "title": "metro.pdf", "url": "https://https://localhost:8080/portal/rest/jcr/repository/collaboration/sites/acme/documents/metro.pdf" } ] }
Check out the documentation for all parameters: https://docs.exoplatform.org/
Note that this API is still experimental. So please make sure you understand what that means before using it in your application.
Future Work
While already incredibly useful, we have plenty of ideas to improve the unified search.
Here is what plan to work on in the next few months:
1. We want to make it very easy for you to plug in your own connectors. You should be able to search data beyond eXo and bind to an enterprise search server or other business data sources.
2. We also plan to make a connector to search in activity streams. Since activity streams reflect all the interactions that have happened, this type of search will let you easily dig into the past.
3. Finally, we plan to improve the filters to provide more facets.
As usual, we welcome any feedback and ideas (add a comment in the forums).