My objective is for full text case insensitive search on the node *name* 
property.

   1. Should I be using indexes and constraints 
   <http://neo4j.com/docs/stable/query-schema-index.html> instead of using 
legacy 
   lucene indexing 
   <http://neo4j.com/docs/stable/indexing-create-advanced.html#d5e32256>?
   2. Do legacy features eventually get removed on newer releases?
   3. Does a cypher query with *(?i).*<word>.** use the *name* property 
   index?

*Cypher WHERE Case Insensitive Search with Wildcard*
CREATE INDEX ON :ProgrammingLanguage(name);

CREATE (n:ProgrammingLanguage {name:"Python"});
CREATE (n:ProgrammingLanguage {name:"Python 2.7"});
CREATE (n:ProgrammingLanguage {name:"Python 3.4"});

PROFILE MATCH (n:ProgrammingLanguage)
WHERE n.name=~"(?i).*PYT.*"
RETURN n;

NodeByLabelScan = 9 estimated rows and 4 db hits
Filter = 7 estimated rows and 6 db hits

*Legacy Lucene Fulltext Search*
neo4j-shell -v -c "index --create node_auto_index -t Node"
neo4j-shell -v -c "index --set-config node_auto_index type fulltext"
neo4j-shell -v -c "index --get-config node_auto_index"

CREATE (n:ProgrammingLanguage {name:"Python"});
CREATE (n:ProgrammingLanguage {name:"Python 2.7"});
CREATE (n:ProgrammingLanguage {name:"Python 3.4"});

PROFILE START result=node:node_auto_index("name:*PYT*")
RETURN result;

NodeByLabelScan = 87 estimated rows \ 4 db hits

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

Reply via email to