return "(" + query1 + " OR " + query2 + ")";
}
private static int appendDocs(DocSlice searchResult, int offset, int[] docList, float[] scoreList, int maxCount) {
boolean hasScores = searchResult.hasScores();
DocIterator iterator = searchResult.iterator();
int count = offset;
while (iterator.hasNext() && (maxCount <= 0 || count < maxCount)) {
int docId = iterator.nextDoc();
// don't add any duplicate documents
if (docExists(docId, docList))
continue;
// add the doc to the total doc list
docList[count] = docId;
if (hasScores) {
scoreList[count] = iterator.score();
}
count++;
}
return count;