Search with Search Clusters - Fluid Topics - 3.10 - Technical Notes

Integrate Fluid Topics APIs

Fluid Topics
Fluid Topics Version
Technical Notes
Target Audience

Searching with clusters consists in defining facets to get clustered search results. For example, by it is possible to cluster search results based on the product they concern.

By using the Global Clustered Search web service, it is possible retrieve all information contained in all documents directly from the Fluid Topics server:


The web service returns a list of all matching documents for all versions. Users can select a facet to cluster results by version, for example, and view the number of documents available for each facet value.

The following image shows how the results available in a turnkey Fluid Topics portal can be displayed in another portal with clustering applied:

Clustered search

The following image demonstrates how it is possible to display tags with with the number of matching results for each facet:

Clustered search and facets

The following lines show an example of a Global Clustered Search web service implementation in PHP. Product and AFS_Version facets are defined as cluster criteria:

if( is_null( $filter ) )
$filter = array();
$data = array(
"query" => $query,
"contentLocale" => "en-US",
"paging" => array( "page" => $page, "perPage" => 20 ),
"facets" => array(array("id" => "Product"),array("id" => "AFS_Version")),
"filters" => $filter
$url = $this->tenant . "/api/khub/clustered-search";

It is necessary to define the tenant URL statically or dynamically and specify the API path.

The following example shows an HTML file embedding the Global Clustered Search web service:

<body style="background-color: azure;">
<div id="search">...</div>


function Search(){
data = {...};
$('#facet1').on("changed.jstree", function (e, data) {...});
$('#facet2').on("changed.jstree", function (e, data) {...});
$('#facet3').on("changed.jstree", function (e, data) {...});