modified the top n documents in relevance model to store doc indices,
fixed issues with reading documents as xml.