pig-lucene/src/main/java/com/twitter/elephantbird/pig/load/LuceneIndexLoader.java
@Override
  @SuppressWarnings("unchecked")
  public void prepareToRead(RecordReader reader, PigSplit split) {
    this.reader = (LuceneIndexRecordReader<T>) reader;
  }
@Override
  @SuppressWarnings("unchecked")
  public void prepareToRead(RecordReader reader, PigSplit split) {
    this.reader = (LuceneIndexRecordReader<T>) reader;
  }
THIS INVOLVES AN UNCHECKED CAST
Pig gives us a raw type for the RecordReader unfortunately.
However, because {@link #getInputFormat()} is final and delegates
to {@link #getLuceneIndexInputFormat()} we can be reasonably sure
that this record reader is actually a LuceneIndexRecordReader<T>