Hello,
I have the following question: How to sort on UDT subfields?
schema:
schema.type('UDT').ifNotExists().property('id', Uuid).property('value', Varchar).property('cids', setOf(Uuid)).create() schema.vertexLabel('Vertex').ifNotExists().partitionBy('id', Uuid).property('names', setOf(frozen(typeOf('UDT')))).create() schema.vertexLabel('Vertex').searchIndex().ifNotExists().by('id').by('names').create()
data:
g.addV('Vertex').property('id', UUID.randomUUID()) .property('names', [ [ id: UUID.randomUUID(), value:'Name1', cids: [UUID.randomUUID()] as Set] as UDT] as Set) g.addV('Vertex').property('id', UUID.randomUUID()) .property('names', [ [ id: UUID.randomUUID(), value:'Name2', cids: [UUID.randomUUID()] as Set] as UDT] as Set)
I want to sort on the values in names, is this possible? I found in the documentation (link), that it is not possible in DSE Search. But is it possible in a gremlin Query?
Thanks in advance.
Josef