private static boolean preliminaryRegisterValue ( BytesRef term , ComponentTermVector termVector , TermvectorNumberBasic number , Integer termNumberMaximum , Integer segmentNumber , String [ ] mutableKey ) throws IOException { long sortValue = 0 ; if ( termVector . subComponentFunction . sortDirection . equals ( CodecUtil . SORT_DESC ) && termVector . subComponentFunction . sortType . equals ( CodecUtil . STATS_TYPE_SUM ) ) { sortValue = termVector . subComponentFunction . parserFunction . getValueLong ( number . valueSum , 0 ) ; } else if ( termVector . subComponentFunction . sortDirection . equals ( CodecUtil . SORT_DESC ) && termVector . subComponentFunction . sortType . equals ( CodecUtil . STATS_TYPE_N ) ) { sortValue = number . docNumber ; } else { return true ; } MtasDataCollector < Long , ? > dataCollector = ( MtasDataCollector < Long , ? > ) termVector . subComponentFunction . dataCollector ; if ( termVector . boundaryRegistration ) { return dataCollector . validateSegmentBoundary ( sortValue ) ; } else { String segmentStatus = dataCollector . validateSegmentValue ( sortValue , termNumberMaximum , segmentNumber ) ; if ( segmentStatus != null ) { if ( segmentStatus . equals ( MtasDataCollector . SEGMENT_KEY_OR_NEW ) ) { return true ; } else if ( segmentStatus . equals ( MtasDataCollector . SEGMENT_POSSIBLE_KEY ) ) { mutableKey [ 0 ] = MtasToken . getPostfixFromValue ( term ) ; segmentStatus = dataCollector . validateSegmentValue ( mutableKey [ 0 ] , sortValue , termNumberMaximum , segmentNumber , true ) ; return segmentStatus != null ; } else { // should never happen? return false ; } } else { return false ; } } }
Preliminary register value .