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

Manage Images in Fluid Topics

Product
Fluid Topics
FT_Version
3.3
Category
Technical Notes
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 cat.jpeg and pufferfish.png with related information:
  • cat.jpeg
    • Title: "Little Cat in the Courtyard"
    • Description: "This cat is lying down in a courtyard."
    • Environment: Land
  • pufferfish.png
    • Title: "Little Pufferfish in the Ocean"
    • Description: "This pufferfish is swimming in the ocean."
    • Environment: Water
  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="cat_image" status="visible">
        <ft:file>cat.jpeg</ft:file>
        <ft:dispName>Little Cat in the Courtyard</ft:dispName>
        <ft:description>This cat is lying down in a courtyard.</ft:description>
        <ft:facets>
          <ft:facet name="Environment">Land</ft:facet>
        </ft:facets>
      </ft:resource>
      <ft:resource xml:lang="en-US" id="pufferfish_image" status="visible">
        <ft:file>pufferfish.png</ft:file>
        <ft:dispName>Little Pufferfish in the Ocean</ft:dispName>
        <ft:description>This pufferfish is swimming in the ocean.</ft:description>
        <ft:facets>
          <ft:facet name="Environment">Water</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
      ├── cat.jpeg
      └── pufferfish.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 Environment metadata element:

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

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

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

These two images can be reached by the Environment facet, by using Land and Water values. 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.