The text element is a child of the response element, and contains the matching statement. A response can include one or more of these elements in the form:

<text score="number" name="field">string</text>

If the textSort attribute on the query is true, text statements are sorted in document order (the default sort is by relevance). Sorting by document order allows you to present a meaningful excerpt to the user. You can see the starting position of the <text> statements in the goto="N" attribute.

If the highlight attribute on the query is true, the matching terms in the response text of each result are surrounded with {beginHighlight} and {endHighlight}, as shown:

"{beginHighlight}filter{endHighlight}, oil lubrication
car maintenance {beginHighlight}Air{endHighlight} and Fuel."

You can use this information in the Format droplet, as shown in this example:

<dsp:droplet name="/atg/dynamo/droplet/Format">
  <!-- this parameter is the text with the curly brace highlight info -->
  <dsp:param name="format" value="${result.text}"/>
  <!-- the following two dsp:param tags supply the replacement text for
  the {Xhighlight} encodings -->
  <dsp:param name="beginHighlight" value="<div class='highlight'>"/>
  <dsp:param name="endHighlight" value="</div>"/>
  <dsp:oparam name="output">
    <!-- converted text is output here -->
    <dsp:valueof param="message" conververter="Nullable" />
  </dsp:oparam>
</dsp:droplet>