[ You are here: XTF -> Tag Reference -> crossQuery -> Search Result Formatter -> Document Hit Tag ]

Document Hit Tag

This tag identifies a document containing one or more matches for the current query. This tag has the form:
<docHit rank  = "DocRelevanceRank"
        path  = "DocumentLocation"
        score = "DocRelevanceScore">
 
    DocumentMetaData
 
    Snippet
    Snippet
       …
 
    {ScoreExplanation}
 
</docHit>
where
rank="DocRelevanceRank" is the ordinal ranking of this matching document, with 1 being the most relevant document for a query. Note that this is an absolute ranking for the document with respect to the entire query, and not a page relative ranking. For more information about paged queries, see the query tag.
path="DocumentLocation" is the file path and name for the matching document. This path is relative to the base XTF directory (i.e., XTF_HOME.)
score="DocRelevanceScore" is the document relevance score ranging from 0% to 100%. The document with the highest overall relevance will receive a score of 100%, and less relevant documents will receive lower scores. Note that this score is an overall relevance score and is not affected by paging. For information about paged queries, see the query tag.
DocumentMetaData is a tag which contains the meta-data for the matching document. See the Document Meta-Data Tag for more information.
Snippet are tag(s) that contain the text of individual hits within the document, along with surrounding context, as requested in the query. See the Snippet Tag for more information.
ScoreExplanation are tags only present if score explanation was requested in the query. These tags detail how the textEngine calculated the score for this document. See the Score Explanation Tag for more information.