I am following this tutorial by Michael http://jexp.de/blog/2014/03/full-text-indexing-fts-in-neo4j-2-0/ to setup my full text index. But there are couple of issues I ran into.
I have a node server running on my PC (windows). Anyway, I have something running on localhost that uses jQuery. So I used jQuery to make an ajax post call in the chrome console.
Step1:
$.ajax({
url: 'http://localhost:7474/db/data/index/node/',
type: 'post',
data: JSON.stringify({'name': 'NewIndex', 'config':{'type':'fulltext', 'provider':'lucene', 'to_lower_case': 'true'}}),
headers: {
"Content-Type": 'application/json',
"Accept": 'application/json; charset=UTF-8'
},
dataType: 'json',
success: function (data) {
console.log(data);
}
});
This worked! So it created an index. Next as the tutorial suggests, I setup these settings and restarted the server:
Step 2:
node_auto_indexing=true
node_keys_indexable=description
Next I used the following to reset properties
Step 3:
MATCH (n:anodelabel)
WHERE has(n.description)
SET n.description=n.description
Next I tried to query it in the browser localhost:7474.
Step 4:
START anodelabel=node:NewIndex("description:word*")
MATCH (o:anodelabel)<-[r:AUTHOR]-(user)
RETURN o LIMIT 10
But this is returning an empty set. So I tried to post a new item CREATE (n:anodelabel {description: "needs to work"}) and used the cypher call again. Again an empty set.