The Product Datasheets document consists of three datasheets, one for each product: Product 1, Product 2, and Product 3.
Each product has a specific reference number which is not written in the topic content but only given in the topic metadata.
The following lines shows the _product_datasheets.ditamap file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap xml:lang="en-US" linking="none">
<booktitle>
<mainbooktitle>Product Datasheets</mainbooktitle>
</booktitle>
<chapter>
<topicref href="product1.dita"/>
<topicref href="product2.dita"/>
<topicref href="product3.dita"/>
</chapter>
</bookmap>
Each topic is created according to the following template:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="productx">
<title>$PRODUCT_NAME</title>
<shortdesc></shortdesc>
<prolog>
<metadata>
<othermeta name="reference" content="$PRODUCT_REFERENCE"></othermeta>
</metadata>
</prolog>
<conbody>
<p>The $PRODUCT_NAME is $COLOR.</p>
</conbody>
</concept>
The following lines show the product1.dita file set for the AD1000 product reference:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="product1">
<title>Product 1</title>
<shortdesc></shortdesc>
<prolog>
<metadata>
<othermeta name="reference" content="AD1000"></othermeta>
</metadata>
</prolog>
<conbody>
<p>The Product 1 is green.</p>
</conbody>
</concept>
As you can see, the product reference is not part of the topic content. It is only present as a metadata in a prolog element.
By default, Fluid Topics does not allow to search for a metadata value directly in full-text search. For instance, a query with the AD1000 metadata value returns no results:
To make sure that the product reference is searchable in plain text in Fluid Topics, the reference metadata key must be set to be indexed in the Metadata Management interface.
When the configuration is saved, a reprocessing is launched.
Now when searching for AD1000, Fluid Topics returns the Product 1 topic. It is the only piece of content with the AD1000 metadata value so it is logically the only result matching the query.