简体   繁体   中英

Lucene query building in neo4jrestclient?

I'm trying to follow these docs: http://readthedocs.org/docs/neo4j-rest-client/en/latest/indices.html This works fine

from neo4jrestclient.client import GraphDatabase, Q
db = GraphDatabase("http://localhost:7474/db/data")
userIndex = db.nodes.indexes.get("index2")
print userIndex.query('username', "*")[:]

and according to the docs, this should also work, but doesn't.

print userIndex.query(Q('username', "*"))[:]

I upgraded to the latest version in the pip repository. Is this a bug?

I'm not sure if that is an issue on neo4j-rest-client than the lucene-querybuilder . Anyway, you can try using the argument wildcard like:

print userIndex.query(Q('username', "*", wildcard=True))[:]

And tell me if it worked :-)

这是/是一个错误,我在这里提交: https : //github.com/versae/neo4j-rest-client/issues/67

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM