I am getting the following error, because some of the vertexes don't have the expected property.
The property does not exist as the key has no associated value for the provided element
Query:-
get_g().V().hasLabel(search_vertex).has(T.id, TextP.containing(search_text)).limit(limit).
as_('property_value').inE('owns').outV().as_('id', 'name')
.select('property_value', 'id', 'name').by(T.id).by(T.id).by('name').toList()
How to avoid exception and return NULL
or empty space
, if the expected property doesn't exist