Fulltext Search in Neo4j

29 views
Skip to first unread message

Anthony Wong

unread,
Jan 5, 2017, 5:19:16 AM1/5/17
to Neo4j

I have question on full text search using neo4j. Followed the instruction in the webpage, i enabled the full text search.


Full Text Search Guide


CREATE (p:Place {name:"Chicago"})

1) Run the command: START n=node:node_auto_index("name:*C*") RETURN n;
Result: 
+------------------------------+
| n                            |
+------------------------------+
| Node[65263]{name:"Chicago"}  |
+------------------------------+
1 rows

2) Run the command: START n=node:node_auto_index("name:Chicago") RETURN n;
Result:
+---+
| n |
+---+
+---+
0 row

3) START n=node:node_auto_index("name=Chicago") RETURN n;
Result: 
null

My question is: How can modify the search (2) START n=node:node_auto_index("name:Chicago") RETURN n; or START n=node:node_auto_index("name:Ch*") RETURN n; to give the result Chicago ?


Also, would we not specify the field name in the command, (i.e. search all fields which contains "Chicago" keyword in all nodes) ?


Thanks.

Michael Hunger

unread,
Jan 5, 2017, 5:24:43 AM1/5/17
to ne...@googlegroups.com, Max De Marzi Jr.
This should actually work. Which version are you using?

either this: START n=node:node_auto_index(name="Chicago") RETURN n;
or START n=node:node_auto_index("name:Chicago") RETURN n;

To search across all fields (which you need to have configured, you would replace the field-name with a star *.

START n=node:node_auto_index("*:Chicago") RETURN n;


--
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 neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages