code: protected void addDoubleValue(Document doc, String fieldName, Object internalValue)
     {
        double doubleVal = ((Double)internalValue).doubleValue();
        doc.add(createFieldWithoutNorms(fieldName, DoubleField.doubleToString(doubleVal), PropertyType.DOUBLE));
     }
docs: Adds the double value to the document as the named field. The double
  value is converted to an indexable string value using the
  {@link DoubleField} 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.