Hierarchical string metadata associates a tree of string values with a key. For instance, if the metadata is configured as a search facet, Fluid Topics allows users to search for all content matching one of the nodes of the hierarchy.
The following example shows an example of hierarchical string metadata:
from fluidtopics.connector import StructuredDocument, Metadata
hierarchical_string_meta = Metadata(
"Antidot",
[
["Solutions", "Fluid Topics"],
["Solutions", "AFS@Store"],
["Technology", "Content Delivery"],
["Technology", "Taruqa Search"],
["Technology", "Content Classifier"]
]
)
book_A = StructuredDocument.create(
document_id="my-structured-document-book-a",
title="My Structured Document - BookA",
locale="en-US",
pretty_url="my-pretty-structured-document-book-a",
toc=[topicA, topicB],
editorial_type=EditorialType.BOOK,
metadata=[hierarchical_string_meta]
)