void onInSegmentGap(int i, int j, int previousJ) {
        gaps++;
        if (j>previousJ) {
            gapLength+=abs(j-previousJ)-1; // gap length may be 0 if the gap was in the query
        }
        else {
            outOfOrder++;
            gapLength+=abs(j-previousJ);
        }
    }
Called when a gap (within a sequence) is encountered
searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/FieldMatchMetrics.java