syntax = "proto2";

package NRTYServer;

message TIndexMetadata {
    message TKiwiTuplesList {
        repeated string Tuples = 1;
        optional string Layer = 2;
    }

    message TFullArchiveHeader {
        enum TStage {
            STARTED = 1;
            REMAP_BLOCK_INFO = 2;
            REMAP_POSITIONS = 3;
            FINISHED = 4;
        }
        optional bool Filtered = 1[default=false];
        optional bool Compressed = 2[default=false];
        optional TStage Stage = 4[default=FINISHED];
        optional uint32 Version = 5[default=0];
        optional int32 DocsCount = 6[default=-1];
        repeated string WritedLayers = 7;
    }

    message TAnnotationHeader {
        optional string DataFormat = 1 [default="COMPTRIE"];
        optional string Name = 2;
    }

    message TL2IndexHeader {
        optional string EntityName = 1;
        optional uint32 NormalizerVersion = 2 [default=0]; 
    }

    repeated TKiwiTuplesList TuplesList = 1;
    optional TFullArchiveHeader FullArcHeader = 2;
    optional bool IsPrefixed = 3;
    optional bool SuggestClearUnusefulData = 4;
    optional TAnnotationHeader AnnHeader = 5 [deprecated=true];
    optional TAnnotationHeader FactorAnnHeader = 6 [deprecated=true];
    repeated TAnnotationHeader AnnHeaders = 7;
    repeated TL2IndexHeader L2IndexHeaders = 8;
    optional string PropConfig = 9;
}

