Example #1
0
 private void OpenCreateIndexes()
 {
     spo_o_index = new FlexIndexView <SubjPredObj>(path + "spo_o_index", otriples.Root,
                                                   ent => new SubjPredObj()
     {
         subj = (string)ent.Field(0).Get(), pred = (string)ent.Field(1).Get(), obj = (string)ent.Field(2).Get()
     });
     sp_d_index = new FlexIndexView <SubjPred>(path + "subject_d_index", dtriples.Root,
                                               ent => new SubjPred()
     {
         subj = (string)ent.Field(0).Get(), pred = (string)ent.Field(1).Get()
     });
     op_o_index = new FlexIndexView <SubjPred>(path + "obj_o_index", otriples.Root,
                                               ent => new SubjPred()
     {
         subj = (string)ent.Field(2).Get(), pred = (string)ent.Field(1).Get()
     });
 }
Example #2
0
 private void OpenCreateIndexes()
 {
     spo_o_index = new FlexIndexView <SubjPredObjInt>(path + "spo_o_index", otriples.Root,
                                                      ent => new SubjPredObjInt()
     {
         subj = (int)ent.Field(0).Get(), pred = (int)ent.Field(1).Get(), obj = (int)ent.Field(2).Get()
     });
     sp_d_index = new FlexIndexView <SubjPredInt>(path + "subject_d_index", dtriples.Root,
                                                  ent => new SubjPredInt()
     {
         subj = (int)ent.Field(0).Get(), pred = (int)ent.Field(1).Get()
     });
     op_o_index = new FlexIndexView <SubjPredInt>(path + "obj_o_index", otriples.Root,
                                                  ent => new SubjPredInt()
     {
         subj = (int)ent.Field(2).Get(), pred = (int)ent.Field(1).Get()
     });
     if (!Scale.Filescale)
     {
         Scale.CreateScale(otriples);
     }
 }