Provide Suggestions in the Search Box - Fluid Topics - 3.8

Integrate Fluid Topics API

Fluid Topics
Technical Notes

The Suggest feature suggests documents, such as books or topics, in a drop-down menu, as users are typing the first characters of their keywords in the search box.

For instance, when typing the first two characters of "administration", the following books, articles, or topics are suggested in a drop-down menu.

Suggestions on the portal

The feature is also available through the Suggest web service:


The following picture shows how the Suggest feature can be used otherwise than by using the turnkey portal:

Suggest web service principle

For instance, the following picture illustrates another UI using the Suggest web service:

Suggestions with a web service in another portal than Antidot Technical Publications

The following lines show an example of implementing the Suggest web service in PHP.

Note: The tenant URL must be statically or dynamically defined with the API path.
public function get_suggest( $query = null )
    $data = array(
	   "input" => $query,
	   "contentLocale" => "en-US"
    $url = $this->tenant . "/api/khub/suggest";

The following example shows a HTML file setting the web page output. It embeds the Suggest web service function.

      source: "example_use_suggest.php",
      minLength: 1