protected void addReferenceValue ( Document doc , String fieldName , Object internalValue ) { String uuid = internalValue . toString ( ) ; doc . add ( createFieldWithoutNorms ( fieldName , uuid , PropertyType . REFERENCE ) ) ; doc . add ( new Field ( FieldNames . PROPERTIES , FieldNames . createNamedValue ( fieldName , uuid ) , Field . Store . YES , Field . Index . NO , Field . TermVector . NO ) ) ; }
Adds the reference value to the document as the named field . The value s string representation is added as the reference data . Additionally the reference data is stored in the index .