A Schema specifies the fields in a Document to index by the search engine. Schemas are specific to a Vault so you may update schemas in one Vault without affecting the schemas in another Vault.

When a Schema is updated, all Documents associated with the updated Schema will be automatically re-indexed by our search engine.

A Schema with Documents associated with it can not be deleted. You must delete all documents first.
 private SchemaSaveSuccessResponse AssertCreateSchemaSuccess(Schema schema, Guid vaultId)
 {
     SchemaSaveSuccessResponse response = trueVaultClient.CreateSchema(vaultId, schema);
     Assert.IsNotNull(response, "Response should not be null");
     Assert.AreNotEqual(response.Schema.Id, default(Guid), "Schema ID should be a non-default GUID");
     Assert.AreNotEqual(response.TransactionId, default(Guid), "Transaction ID should be a non-default GUID");
     Assert.AreEqual(response.Result, "success", "Response should indicate success");
     return response;
 }
 private Schema CreatePersonSchema(string schemaName)
 {
     var personSchema = new Schema<Person>(schemaName, new SchemaField("Id", false).AsInteger(),
         new SchemaField("Name"),
         new SchemaField("Email"));
     personSchema
         .RegisterNestedField<Address>(p => p.Address, a => a.Id, null, false)
         .RegisterNestedField<Address>(p => p.Address, a => a.PersonId)
         .RegisterNestedField<Address>(p => p.Address, a => a.Street)
         .RegisterNestedField<Address>(p => p.Address, a => a.City)
         .RegisterNestedField<Address>(p => p.Address, a => a.State)
         .RegisterNestedField<Address>(p => p.Address, a => a.PostalCode)
         .RegisterNestedField<Address>(p => p.Address, a => a.Country)
         .RegisterNestedField<Address>(p => p.Address, a => a.AddressType);
     return personSchema;
 }
Example #3
0
 internal SchemaGetResponse(string result, Guid transactionId, Schema schema)
 {
     Result = result;
     TransactionId = transactionId;
     Schema = schema;
 }