if (DebugFile.trace) DebugFile.writeln("new IndexSearcher("+sSegments+")");
IndexSearcher oSearch = new IndexSearcher(sSegments);
if (iLimit>0) {
if (DebugFile.trace) DebugFile.writeln("IndexSearcher.search("+oQry.toString()+", null, "+String.valueOf(iLimit)+")");
TopDocs oTopSet = oSearch.search(oQry, null, iLimit);
if (oTopSet.scoreDocs!=null) {
ScoreDoc[] oTopDoc = oTopSet.scoreDocs;
int iDocCount = oTopDoc.length;
if (DebugFile.trace) DebugFile.writeln("doc count is "+String.valueOf(iDocCount));
aRetArr = new MailRecord[iDocCount];