Using Janus 0.4 with Cassandra as storage backend and ES as index backend.
"janusgraph_dsindex1" : {
"aliases" : {
"janusgraph" : { }
},
"mappings" : {
"dsIndex1" : {
"properties" : {
"all" : {
"type" : "text"
},
"displayName" : {
"type" : "text",
"fielddata": true
},
"displayName__STRING" : {
"type" : "keyword"
}
}
}
},
"settings" : {
"index" : {
"number_of_shards" : "5",
"provided_name" : "janusgraph_dsindex1",
"max_result_window" : "2147483647",
"creation_date" : "1572330778198",
"number_of_replicas" : "1",
"uuid" : "NXKRX2ayRKyI4Sy3pbjJ3Q",
"version" : {
"created" : "6010399"
}
}
}
When I use the below query, I get error.
gremlin> getTraversalSource("8c0118b6-a109-47b2-9ec5-c1b2a7dc2c12").V().has('displayName',textContainsPrefix('t')).order().by('displayName__STRING').profile()
The property does not exist as the key has no associated value for the provided element: v[40964168]:displayName__STRING
Type ':help' or ':h' for help.
But If I set fielddata: true, order by(sorting) works.
getTraversalSource("8c0118b6-a109-47b2-9ec5-c1b2a7dc2c12").V().has('displayName',textContainsPrefix('t')).order().by('displayName').profile()
Any idea, how to set fielddata=true while creating mixed index from janus? How to accomplish this? Appreciate your help on this.