Image Upload with Metadata - Fluid Topics - 3.4 - Technical Notes

Manage Images in Fluid Topics

Product
Fluid Topics
Fluid Topics Version
3.4
Category
Technical Notes
Target Audience
public

In Fluid Topics, Unstructured Documents are files intended to be indexed, such as PDF files, Word files, and so on. On Fluid Topics, users can consult or download them in the Document Viewer. To enhance the searchability of unstructured documents, metadata can be applied to these files by using the FluidTopicsControlFile.xml Control File.

Standalone image files are uploaded in Fluid Topics as Unstructured Documents. They can be indexed if metadata were set for them.

The metadata-provided standalone images can be searched for by different means:
  • You can filter them with facets: the ft:publication facet value. This facet gathers all Publication name and all facet values defined in the Control File.

  • You can search for them using keywords, according to the metadata applied to the image, in the Search field.

Note: Images within a structured content cannot be assigned metadata and therefore they cannot be indexed. As a consequence, they are not searchable.
To send the two images time_zone_cheatsheet.png and standard_time_zones_of_the_world.png with related information:
  • time_zone_cheatsheet.png
    • Title: "Time Zone Cheatsheet"
    • Description: "This document helps you define a time zone to set for your time travel."
    • Category: TechDoc
  • standard_time_zones_of_the_world.png
    • Title: "Standard Time Zones of the World"
    • Description: "This document shows all the time zones available on the planet."
    • Category: TechDoc
  1. Add the images to the FluidTopicsControlFile.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <ft:resources xmlns:ft="http://ref.fluidtopics.com/v2/ft#" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://ref.fluidtopics.com/v2/udControlFile.xsd">
    
       <ft:resource xml:lang="en-US" id="time_zones_image" status="visible">
          <ft:file>time_zone_cheatsheet.png</ft:file>
          <ft:dispName>Time Zone Cheatsheet</ft:dispName>
          <ft:description>This document helps you define a time zone to set for your time travel.</ft:description>
          <ft:facets>
             <ft:facet name="Category">TechDoc</ft:facet>
          </ft:facets>
       </ft:resource>
       <ft:resource xml:lang="en-US" id="standard_time_zones_image" status="visible">
          <ft:file>standard_time_zones_of_the_world.png</ft:file>
          <ft:dispName>Standard Time Zones of the World</ft:dispName>
          <ft:description>This document shows all the time zones available on the planet.</ft:description>
          <ft:facets>
             <ft:facet name="Category">TechDoc</ft:facet>
          </ft:facets>
       </ft:resource>
    </ft:resources>
  2. Prepare the ZIP archive. All files must be at the root level:
    images-with-metadata.zip/
      ├── FluidTopicsControlFile.xml
      ├── time_zone_cheatsheet.png
      └── standard_time_zones_of_the_world.png
  3. Declare the metadata element in the conf.json configuration file.
    • In the descriptors part to enable this metadata element's treatment by Fluid Topics.

      The following lines show an example of the declaration of the Category metadata element:

      {
         "projectName": "...",
         "ui": {
            ...,
            "metadata": {
               "descriptors": [
                  ...,
                  {   
                     "id": "Category",
                     "label": {
                        "en-US": "Category",
                        "fr-FR": "Catégorie"
                     }
                  },
                  ... 
               ],
               ...
            }
         },
         "pafs": {
         ...
         }
      }
    • In the tags and facets parts depending on the display needs.

      The following lines show an example of the Category metadata element set to be displayed as tags and facets in Fluid Topics:

      {
         "projectName": "...",
         "ui": {
            ...,
            "metadata": {
               "descriptors": [
                  ... 
               ],
               "tags": {
                  "search": [
                     ...,
                     "Category", 
                     ...],
                  "reader": [
                     ...,
                     "Category", 
                     ...]
                  },
               "facets": {
                  "home": [
                     ...,
                     "Category", 
                     ...],
                  "search": [
                     ...,
                     "Category", 
                     ...]
                  }
              }
          },
          "pafs": {
             ...
          }
      }
  4. Publish the ZIP archive through the Unstructured Documents processing pipeline.

These two images can be reached by the Category facet, by using TechDoc value. They are displayed with their display name, their description, and their Category tag in the Search Results page:
Images displayed in the Search Results page

Click on an image title to open it in the Document Viewer page.
Image opened in Fluid Topics Document Viewer