Closed bbm-design closed 1 year ago
update :
Had to define it one step higher, it could lead to confusion, but i'll leave it here in case it could help someone else
if ((await _arango.View.ListAsync(StaticDBIdentifiers.DBName)).Where(o => o.Name == StaticDBIdentifiers.ViewProductWithSort).ToList().Count() <= 0)
await _arango.View.CreateAsync(StaticDBIdentifiers.DBName, new ArangoView
{
Name = StaticDBIdentifiers.ViewProductWithSort,
Links = new Dictionary<string, ArangoLinkProperty>
{
[StaticDBIdentifiers.Vertexes.Product] = new ArangoLinkProperty
{
IncludeAllFields = true,
Fields = new Dictionary<string, ArangoLinkProperty>
{
["name"] = new ArangoLinkProperty
{
Analyzers = new List<string>
{
StaticDBIdentifiers.AnalyzerNgram,
StaticDBIdentifiers.AnalyzerTokenizer
},
},
["description"] = new ArangoLinkProperty
{
Analyzers = new List<string>
{
StaticDBIdentifiers.AnalyzerNgram,
StaticDBIdentifiers.AnalyzerTokenizer
}
},
}
}
},
PrimarySort = new List<ArangoSort>
{
new ArangoSort
{
Field = "creationDate",
Direction = ArangoSortDirection.Desc,
}
}
});
i have created a view using this piece of code
once executed, i get this
i'm either using it the wrong way, or there is something wrong with the setter