JanusGraph 1.0 full-text search predicate in python - broken

Hi All,

with JanusGraph 0.6 and gremlin-python 3.5.4, I was able to use the following in Python to use JanusGraph full-text search predicate:
-----
from gremlin_python.process.traversal import P
g.V().has('firstName', P('textRegex', 'john')).toList()
-----

with JanusGraph 1.0 and gremlin-python 3.7.0, I am getting the following error:
Received error message '{'requestId': 'None', 'status': {'code': 499, 'message': 'Invalid OpProcessor requested [null]', 'attributes': {}}, 'result': {'meta': {}, 'data': None}}'

Could you please suggest any workaround how to make the above query work on JanusGraph 1.0 and gremlin-python 3.7.0? Thank you.
Solution
The problem here is probably that JanusGraph used to serialize its text predicates as if they were TinkerPop text predicates, just with a value corresponding to the value of the JanusGraph text predicate, e.g., TextP.textContains() was serialized as if it were P.textContains().
That was changed in version 0.6.0 of JanusGraph to let JanusGraph serialize its predicates with a JanusGraph specific type identifier, but the server kept a fallback mechanism so it could still deserialize predicates sent that way: https://docs.janusgraph.org/changelog/#serialization-of-janusgraph-predicates-has-changed

This fallback mechanism was then removed in JanusGraph 1.0.0: https://docs.janusgraph.org/changelog/#remove-support-for-old-serialization-format-of-janusgraph-predicates

Our assumption was that it would only affect users who would use a JanusGraph driver with a version older than 0.6.0, connecting to a server on 1.0.0. This is of course not a supported config in general, so removing that fallback didn't seem like a problem.
We unfortunately didn't expect users to rely on this mechanism by creating a TinkerPop P predicate themselves with a JanusGraph predicate value like you are doing here
Was this page helpful?