code: public static BytesRefTermStream get(IndexReader reader, IndexFieldData indexFieldData) {
      if (indexFieldData instanceof IndexNumericFieldData) {
        IndexNumericFieldData numFieldData = (IndexNumericFieldData) indexFieldData;
        switch (numFieldData.getNumericType()) {
  
          case INT:
            return new IntegerBytesRefTermStream(reader, numFieldData);
  
          case LONG:
            return new LongBytesRefTermStream(reader, numFieldData);
  
          default:
            throw new UnsupportedOperationException("Streaming numeric type '" + numFieldData.getNumericType().name() + "' is unsupported");
  
        }
      }
      else {
        return new BytesBytesRefTermStream(reader, indexFieldData);
      }
    }
docs: Instantiates a new reusable {@link BytesRefTermStream} based on the field type.