How can I search within comments in a topic?

You can create an index to search within comments in a topic.

Description

I want to search within comments that are encapsulated with <!– -->.

Solution

This index creates a column titled XML Comments that will indicate either no comment or contains comments.

In the TEXTML Administration perspective, perform the following:

  1. Edit the Index Definition file.
    CAUTION: Be careful when editing the Index Definition document. Changes can significantly affect the indexing process, and any errors in the document can lead to data corruption or other errors.
  2. Add the following index:
    <index NAME="comments" SYNC="False">
              <stringindex KEEPEXTRACTEDVALUES="True">
                  <elements>
                  <element XPATH="if (//*[comment()]) then 'contains comments' else 'no comment'" DEPTH="INFINITE"/>
                 </elements>
             </stringindex>
    </index>
  3. In the summaries section, add the following field:
    <field NAME="comments" TYPE="Index" VALUE="All"/>
  4. To add the index to the Advanced Search panel in the Search view, edit the system/conf/advancedSearchIndexes.xml file and add the following:
    <index attr="false" display="XML Comments" listable="true" name="comments" type="index" views="ALL"/>
  5. To display a column named XML Comments in the Search Results view and other views, edit the system/conf/display.xml file and add the following:
    <key halign="LEFT" label=" XML Comments" name="comments" sortOrder="ASC" sortType="ALPHA" type="Index" visibility="255" width="30"/>
  6. When the indexing is complete, restart your IXIA CCMS Desktop.
  7. Add the new column to your Search Results view.