Clustered semantic search - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service allows users role to retrieve clustered search results for the semantic search.

Semantic search is a premium feature that requires a subscription. Get in touch with a Fluid Topics representative for more information.

Method Endpoint
POST
/api/khub/semantic/clustered-search

Request example

The following lines show an example of a JSON request body:

{
  "query": "What is a drone?",
  "filters": [
    {
      "key": "ft:locale",
      "values": [
        "en-US"
      ]
    }
  ],
  "nbResults": 5
}
Field Type Required? Description
query String Yes Expects the string query used to return matching publications.
filters Array No Filters the results based on selected criteria.
key String No Expects a metadata key.
values Array No Defines the values for the selected key.
nbResults Integer No The number of results for the query. Should be between 1 and 20. Defaults to 5.

Response body

[
  {
    "cluster_id": [
      "abc-123"
    ],
    "documents": [
      {
        "excerpt": "Choose a drone type\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n Choose a drone type \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n There are many different types of drones on the market, so it is important to choose the right one for your needs. Delivery drones need to be able to carry a payload and have a long range. There are also many different types of drones for personal use, so be sure to do your research before making a purchase.\n\n \n   \n \n \n \n \n \n \n FoodShipper \n LightShipper \n HeavyShipper \n \n \n   \n   \n   \n \n \n Food delivery up to 2 kgs\t \n Package delivery up to 5 kgs\t \n Package delevry up to 20 kgs\n \n \n \n 5 km range at max. workload\t \n 5 km range at max. workload\t \n 10 km range at max. workload\n \n \n \n Very low picking latency\t \n Low picking latency\t \n Medium picking latency\n \n \n \n Higher flight priority\t \n Best effort flight priority\t \n Low flight priority",
        "relevance": 0.08802163600921631,
        "metadata": {
          "ft:publicationId": [
            "DhC9A7LIJ5i_1GdNl8PKUA"
          ],
          "ft:baseId": [
            "content/choose_drone_type.htm"
          ],
          "ft:openMode": [
            "fluidtopics"
          ],
          "ft:clusterId": [
            "content/choose_drone_type.htm"
          ],
          "ft:rights": [
            "ft:public"
          ],
          "ft:sourceName": [
            "madcapflare"
          ],
          "region": [
            "all"
          ],
          "ft:isUnstructured": [
            "false"
          ],
          "ft:lastPublication": [
            "2024-04-12T10:20:06.506449"
          ],
          "ft:sourceId": [
            "madcapflare"
          ],
          "ft:lastTechChange": [
            "2024-04-12"
          ],
          "document_type": [
            "user guide"
          ],
          "ft:title": [
            "Choose a drone type"
          ],
          "ft:isPublication": [
            "false"
          ],
          "drone_type": [
            "food_shipper",
            "heavy_shipper",
            "light_shipper"
          ],
          "ft:lastEdition": [
            "2024-04-12"
          ],
          "audience": [
            "recipient",
            "sender"
          ],
          "ft:isBook": [
            "false"
          ],
          "ft:originId": [
            "content/choose_drone_type.htm"
          ],
          "ft:isArticle": [
            "false"
          ],
          "ft:khubVersion": [
            "4.3.26"
          ],
          "ft:locale": [
            "en-US"
          ],
          "topic_id": [
            "Dib12aDuuH5P7XdnsMjkNg"
          ],
          "map_id": [
            "DhC9A7LIJ5i_1GdNl8PKUA"
          ],
          "toc_id": [
            "atoGViCaLGPHQ9Xjn5OnIg"
          ],
          "map_title": [
            "Getting started"
          ],
          "url": [
            ""
          ],
          "merged": []
        }
      }
    ]
  }
]
Field Type Description
clusterId String The clusterId of the documents.
documents Object An object containing the documents for the cluster.
excerpt String The text found as relevant for the given query.
relevance String A relevance score from -1 to 1. -1 is the lowest possible score, while 1 is the highest possible score.
metadata Object An object containing the metadata for the topic.
Return code Description
200 OK The web service returns search results.

For a comprehensive list of all possible return codes, see Return codes.