[ You are here: XTF -> Tag Reference -> dynaXML -> Document Formatter Input -> Hit Tag ]

Hit Tag

This tag identifies actual matched text in a snippet tag or in the main text for the requested document. This tag has the form:

<xtf:hit hitNum    = "HitNumber"
         rank      = "MatchRelevanceRank"
         score     = "MatchRelevanceScore"
         continues = "YesOrNo"></xtf:hit>
where
xtf: is an XTF namespace prefix added to the tag to differentiate it from tags that came from the original XML document. The prefix will not be present in hit tags that appear within the initial snippets summary tag, but only in hit tags that occur in the main text for the document. The namespace URI for this prefix is: http://cdlib.org/xtf
hitNum="HitNumber" is the ordinal ID of the current hit. This attribute allows the hit number for the next or previous in-context tag to be easily determined.
rank="MatchRelevanceRank" is the ranking of this match in the current document, with 1 being the most relevant match in the document.
score="MatchRelevanceScore" is the relevance score for this match ranging from 0% to 100%. The snippet with the highest overall relevance will receive a score of 100%, and less relevant snippets will receive lower scores.
continues="YesOrNo" indicates whether this hit continues into the next XML tag (continues="yes") or not (continues="no"). Note that when a hit continues into the next XML tag, a More Tag will always follow.

A hit may contain one or more matched words, which are separately marked with Term Tags.

If the query in the document request included a near or and clause, the Hit Tag will mark the entire range of text between the first and last word found for the clause. Also, within the main text, if the entire range spans multiple XML tags in the document, the hit will be broken down into an initial Hit Tag followed by one or more More Tags.

For summary snippets, if the query for the requested document includes an or clause, all the matched words in the snippet will be marked with Term Tags, but only the word that the snippet is centered around will be marked with a hit tag. Within the main text however, any term matched in the or clause will be marked with both a Hit Tag and a Term Tag.