int numLeft = mLuceneHits.length() - mCurHitNo; int numToReturn = Math.min(numLeft, maxChunkSize);
    protected LuceneIndexIdChunk getNextIndexedIdChunk(int maxChunkSize) throws ServiceException {        try {            int numLeft = mLuceneHits.length() - mCurHitNo;            int numToReturn = Math.min(numLeft, maxChunkSize);            LuceneIndexIdChunk toRet = new LuceneIndexIdChunk();            for (int i = 0; i < numToReturn; i++) {                Document d = mLuceneHits.doc(mCurHitNo++);                                String mbid = d.get(LuceneFields.L_MAILBOX_BLOB_ID);                try {                    if (mbid != null) {//                        toRet[i] = Integer.parseInt(mbid);                        toRet.addHit(Integer.parseInt(mbid), d);                    }                } catch (NumberFormatException e) {                    e.printStackTrace();                }            }                        return toRet;                    } catch (IOException e) {            throw ServiceException.FAILURE("Caught IOException getting lucene results", e);        }    }