Created
May 17, 2013 16:54
-
-
Save coolgarifTech/5600426 to your computer and use it in GitHub Desktop.
Creating an index using python embedded bindings in Neo4j
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with db.transaction: | |
# Create an index for nodes & relations | |
COMPANY_NAME_INDEX = "COMPANY_NAME_INDEX" | |
if db.node.indexes.exists(COMPANY_NAME_INDEX) == 0: | |
companyNameIndex = db.node.indexes.create(COMPANY_NAME_INDEX) | |
else: | |
companyNameIndex = db.node.indexes.get(COMPANY_NAME_INDEX) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment