Hey Filip,
I've tried to answer your questions inline as best as I can:
F. De Haes wrote:
>
> - Relation types give problems in Cypher when they contain a blank space.
> Correct?
>
I believe Andres answered this already. According to his example, make sure
you are using backticks (`) not single quotes (').
F. De Haes wrote:
>
> - In order to solve this, I wanted to rename the relation types. However,
> I
> didn't put them on an index when I created them, Now I know why I should
> have.
>
> So I'm retrieving the relations by $startnode->getRelationships();
>
> When changing the relation type I notice it was not saved correctly.
>
> $relation->setType("new_name");
>
> or
>
> $relation->setType("new_name")->save();
>
> don't result in errors but do not save the changed type. What am I doing
> wrong?
>
I do not believe it is possible to update a relationship's type after it has
been created. At least, the REST API docs do not indicate how to do this.
A quick workaround would be to delete the old relationship, then unset the
relationship's id, so that a new relationship will be created:
$relationship->delete();
$relationship->setId(null)
->setType("new_name")
->save();
You could also index $relationship this time around if you choose.
F. De Haes wrote:
>
> - I'm a bit confused how to change or add properties from a particular
> node
> on the lucene index. Do I have to search whether the property exists
> already
> and remove it first? How would I do that with neo4jphp?
>
You could always assume the property exists, remove it, then recreate it:
$myIndex = new Index($client, Index::TypeNode, "indexName");
$index->remove($node, "some_key", "some_value");
$index->add($node, "some_key", "some_value");
The `remove` call will return false if the property did not exist already,
but you could ignore that.
F. De Haes wrote:
>
> - How can I get a list of lucene indexes in neo4jphp?
>
This feature is not implemented yet. I have created an issue on github to
get it done soon.
F. De Haes wrote:
>
> - How can I get a list of relationship types in neo4jphp (supposed I did
> not
> index any relationship)?
>
Also not implemented yet. I have created an issue on github to get it done
soon.
Thanks for checking out Neo4jPHP!
-- Josh Adell
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-questions-related-to-neo4jphp-tp3348594p3348958.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user