Use Case 1
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.
There is no need to declare the metadata key in any other place (Home page or Search page configuration interfaces).
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.
The tag is present on this screenshot because the metadata was configured to be displayed in search tags in the Search page configuration interface. This configuration does not impact the metadata plain-text search.
Use Case 2
The following lines show an example where two resources are to be indexed in a topic.
<div>
...
<ul>
<li><a href="OD1000_datasheet.pdf" data-ft-index="content">OD1000 Time Machine Datasheet</a></li>
<li><a href="time_capacitor_assembly_scheme.pdf" data-ft-index="content">Assembly Scheme</a></li>
</ul>
</div>
Case of a topic with two indexed resources but only one match
In the Search Results page, when searching for the continuum
keyword only present in one of the resources of the topic, the topic is returned with the relevant resource only.
Case of a topic with two indexed and matching resources
In the Search Results page, when searching for the scheme
keyword contained by the two resources, the topic is returned with its two related resources.
Resource titles are clickable. When clicked, the resource document is opened in the Viewer page.
Please note that the scheme
keyword is highlighted in the topic abstract as it is also present in the topic content.
Case of Search in document
When the topic is opened in the Reader page, it is possible to search for a resource in the Search in document search box.
Case where only the topic matches the query
When searching for the ref
keyword only present in the topic, but not in the resource, only the topic is returned:
-
In the Search page
-
In the Search in document search box:
Only topics count as search results. For instance, a topic and its matching resource only count as one result.