I am having vertices with label name as Campaign. And having a property campaignType and the property value is offline for all the vertices. I unexpectedly updated the schema with out building the index for campaignType. But I needed this very badly for traversing the online campaign.I have tried reindexing but I got an error.I have asked about it in stackoverflow as a new question but i didn't get ay response. So deleting the property is my second thought. So I want to delete that property from all the campaign vertices. I have tried
g.V().hasLabel('Campaign').hasProperty('campaignType').remove()
but got an error
Cannot invoke method remove() on null object
What I expect is all the vertices should present but only campaign type property should get deleted.I don't know what is wrong in my question but help me to get over it.