Classes and AttributesBeing object-oriented the Semantic Graph Index data model uses classes. A class can inherit from one or more classes. Use a single inheritance when possible. A class is made of attributes. Example: class Person {
firstName : String
lastName : String
size : Integer
}
As you can see in this example, attributes have types. The supported types are:
Default ClassThe default class is class Item {
@RootClass
uri: ItemUri
class: ItemClass
self: Binary
text: FullTextSearch
source: String
stamp: String
}
The most important element in this class is the Reference TypeThe
Example: class Company {
name : String
description : Text
}
class Employee : Person {
employeeId : Integer
company : Reference<Company>
}
In this example, the
In our example, it means that from a Standard graph traversal is faster than reverse traversal, but with this ability to
traverse the In our example, the Structure Attributes (Collection, List, and Map Types)The data model supports several "structure" attribute types: The The class Factory {
name : String
location : Geo
}
class Company {
name : String
description : Text
factories : Collection<Factory>
}
The Use the class Photo {
filename : String
content : Binary
exif : Map<String>
}
However, you can specify advanced attribute types, like: class Person {
firstName : String
lastName : String
size : Integer
relationships : Map<List<Reference<Person>>>
}
PackagesA class is part of a package. Packages are similar to Java packages, and used as namespaces. The pair made of the package name and the class name identifies the class. It is therefore possible to have 2 classes with the same name in 2 different packages. When referencing a class outside of the current package, you must use its full name. class Company {
name : String
description : Text
factories : Collection<manufacturing.Factory>
}
EmbeddingThe Semantic Graph Index can store embeddings, using the Technically, an embedding is an array of float32, generated by transforming data (text, images, etc.) into vectors. The goal of embedding models is to return vectors "close to each other" for two objects that carry the same semantics. A similarity function gives the proximity between two vectors. The Semantic Graph Index includes 3 built-in similarity functions: cosine dot product, and euclidian. To get good performance when searching vectors, it is better to build a vector index. To build such an index, you must annotate the Embedding attribute with one of the following annotations: Index Cosine Similarity, Index Dot Product Similarity, or Index Euclidian Similarity. These annotations define the similarity function to use. Time SeriesA time series is a series of data points. Each data point is the association of a timestamp
with an
To display string values, you can define properties of type
| ||||||||||||||||