public synchronized String explain(Query query, int doc) throws IOException {
        return indexSearcher.explain(query, doc).toString();
    }
public synchronized String explain ( Query query , int doc ) throws IOException { return indexSearcher . explain ( query , doc ) . toString ( ) ; }
Method to explain queries matches.

@param query the query used
@param doc the document matched
@return the expalanation
@throws IOException thrown if there is an index error