Schema Index

20 views
Skip to first unread message

Daniel Silva

unread,
Jan 23, 2014, 8:22:49 PM1/23/14
to neo4j...@googlegroups.com
Hi,

I could not figure out how I can use Neo4jClient to create and use indexes defined in schema. This docs did not helps: https://github.com/Readify/Neo4jClient/wiki/indexes

Can someone help me?

Best regards,
Daniel.

Daniel Silva

unread,
Jan 23, 2014, 8:45:56 PM1/23/14
to neo4j...@googlegroups.com
Ok, I found that a can use it like this:

graphClient.Cypher.Create(" INDEX ON :Person(Name)").ExecuteWithoutResults();

After this I would query normally:

graphClient.Cypher
                .Match("(p:Person)")
                .Where((Person p) => p.Name == "Any name")
                .Return(c => c.As<Person>())
                .Results;

The only problem that I'm facing now is that Neo4j only finds a Person with a exact Name: "Any name", but I wanted to query using full text search.

Tatham Oddie

unread,
Jan 23, 2014, 10:24:48 PM1/23/14
to neo4j...@googlegroups.com

Hi Daniel,

 

Schema based indexing, which is what you are using via Cypher there, only supports exact indexing.

 

Full text indexes are not supported in Cypher, or via schemas yet. You’ll need to use the legacy indexing APIs to manually index individual nodes.

 

--

Tatham Oddie

--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jclient...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Daniel Silva

unread,
Jan 24, 2014, 3:03:04 PM1/24/14
to neo4j...@googlegroups.com
Ok, Tatham. Thank you for helping.

By the way, what do you think about adding some Lucene abstraction classes in Neo4jClient instead of only string queries? I would like to contribute on this, because I´m really loving Neo4jClient and I have never contributed to an open source project before.


2014/1/24 Tatham Oddie <tat...@oddie.com.au>

ja...@mavadat.net

unread,
Jan 24, 2014, 6:25:59 PM1/24/14
to neo4j...@googlegroups.com
Daniel, any contribution to Lucene integration would most likely deprecate soon.

Tatham Oddie

unread,
Feb 17, 2014, 12:54:30 AM2/17/14
to neo4j...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages