Defining attributes
The schema
file defines the attribute structure in our domain. When we previously discussed the academic API, we saw a list of different entity attributes, which we could retrieve through the queries. This is defined in a schema.
If you open the Academic.schema
file in the Example
folder where the KES is installed, you will see the attributes defined. We have a title, year, and keyword, which are basic attribute types. In addition, we have a Composite
attribute for the author. This attribute contains more attributes related to the author.
Each attribute will support all attribute operations. There may be cases where this is not desired. Explicitly defining the operations for a given attribute may reduce the index size. In the case of the author ID, we just want to be able to check whether it is equal to something, which we can achieve by adding the following:
{"name":"Author.Id", "type":"Int32", "operations":["equals...