Yep both are the same. As long as you use parameters and have the query compiled, cypher should be not much slower than the core API for this. It is rather important that you batch more than one of these updates (e.g. 1000) in a single transaction to get throughput.
Michael Am 21.02.2014 um 04:22 schrieb Reihane Boghrati <[email protected]>: > Hi again, > > I have another question about indexing, > Will these two kinds of indexing work the same (I mean is the way they index > the schema the same?)?: > JAVA API: > IndexDefinition indexDefinition; > try ( Transaction tx = graphDb.beginTx() ) > { > Schema schema = graphDb.schema(); > indexDefinition = schema.indexFor( DynamicLabel.label( "User" ) ) > .on( "username" ) > .create(); > tx.success(); > } > > Cypher Query: > CREATE INDEX ON :User(username) > > And in general is java api faster than cypher queries? for some queries like: > MATCH (u:User), (uu:User) WHERE u.userid=? AND uu.userid=? CREATE (u) > -(:Friends{status:{1}})-> (uu) > > Best, > Reihane > > On Thursday, February 13, 2014 11:49:57 AM UTC-8, Reihane Boghrati wrote: > I may need to rephrase my sentence, for example we can have a user with > userid = 10 in our database, and when we query the database (which is indexed > by lucene) for user with userid=10, the database may not find a result for > that query. However it actually exists. This is not acceptable for social > networks (which is the focus of BG benchmark). > I heard about this issue in Lucene indexing service from Prof. > Ghandeharizadeh at USC DBLAB. if you wish you can contact him directly. > > On Wednesday, February 12, 2014 10:54:46 AM UTC-8, Reihane Boghrati wrote: > Hi, > > I'm writing a client for Neo4j to evaluate that with BG benchmark. > As far as I know, Neo4j is using Lucene for indexing nodes and the Cypher > query for creating index is something like : CREATE INDEX ON :Users(userid) > I believe that Lucene retrieval is not 100% accurate, meaning that if it > doesn't return data, one cannot be sure data is not existed. Is that right? > I browsed different websites but I couldn't find an alternative index > service. I was wondering if anyone is aware of any other accurate index > provider that can be used in Neo4j? > > Best, > Reihane > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
