private void registerPrefix ( String field , String prefix , IndexOutput outPrefix ) throws IOException { if ( ! prefixReferenceIndex . containsKey ( field ) ) { prefixReferenceIndex . put ( field , new HashMap < String , Long > ( ) ) ; prefixIdIndex . put ( field , new HashMap < String , Integer > ( ) ) ; } if ( ! prefixReferenceIndex . get ( field ) . containsKey ( prefix ) ) { int id = 1 + prefixReferenceIndex . get ( field ) . size ( ) ; prefixReferenceIndex . get ( field ) . put ( prefix , outPrefix . getFilePointer ( ) ) ; prefixIdIndex . get ( field ) . put ( prefix , id ) ; outPrefix . writeString ( prefix ) ; } }
Register prefix .