try {
FlatFile ffile = new FlatFile(cdxFile.getAbsolutePath());
AdaptedIterator<String,SearchResult> searchResultItr =
new AdaptedIterator<String,SearchResult>(
ffile.getSequentialIterator(),
new CDXLineToSearchResultAdapter());
Iterator<BDBRecord> it = new AdaptedIterator<SearchResult,BDBRecord>
(searchResultItr,new SearchResultToBDBRecordAdapter());
index.insertRecords(it);
added = true;