oQrx.add(oQry, BooleanClause.Occur.MUST);
String sSegments = Gadgets.chomp(sLuceneIndexPath,File.separator)+"k_newsmsgs"+File.separator+sWorkArea;
if (DebugFile.trace) DebugFile.writeln("new IndexSearcher("+sSegments+")");
IndexSearcher oSearch = new IndexSearcher(sSegments);
Document oDoc;
if (iLimit>0) {
System.out.println("IndexSearcher.search("+oQrx.toString()+")");
if (DebugFile.trace) DebugFile.writeln("IndexSearcher.search("+oQrx.toString()+")");
TopDocs oTopSet = oSearch.search(oQrx, null, iLimit);
if (oTopSet.scoreDocs!=null) {
ScoreDoc[] oTopDoc = oTopSet.scoreDocs;
int iDocCount = oTopDoc.length;
aRetArr = new NewsMessageRecord[iDocCount];
for (int d=0; d<iDocCount; d++) {
oDoc = oSearch.doc(oTopDoc[d].doc);
String[] aAbstract = Gadgets.split(oSearch.doc(oTopDoc[d].doc).get("abstract"), '¨');
try {
aRetArr[d] = new NewsMessageRecord(oTopDoc[d].score, oDoc.get("workarea"),
oDoc.get("guid"), oDoc.get("container"), oDoc.get("title"),
oDoc.get("author"), DateTools.stringToDate(oDoc.get("created")), oDoc.get("abstract"));
} catch (java.text.ParseException neverthrown) {
throw new ParseException("NewsMessageSearcher.search() Error parsing date "+oDoc.get("created")+" of document "+oDoc.get("guid"));
}
} // next
} else {
aRetArr = null;
}
} else {
Hits oHitSet = oSearch.search(oQrx);
int iHitCount = oHitSet.length();
if (iHitCount>0) {
aRetArr = new NewsMessageRecord[iHitCount];
for (int h=0; h<iHitCount; h++) {
oDoc = oHitSet.doc(h);