code: protected void addLongValue(Document doc, String fieldName, Object internalValue)
     {
        long longVal = ((Long)internalValue).longValue();
        doc.add(createFieldWithoutNorms(fieldName, LongField.longToString(longVal), PropertyType.LONG));
     }
docs: Adds the long value to the document as the named field. The long
  value is converted to an indexable string value using the {@link LongField}
  class.
  
  @param doc           The document to which to add the field
  @param fieldName     The name of the field to add
  @param internalValue The value for the field to add to the document.