i have graph database (neo4j) in configured property auto indexed full-text. working great except have 1 row not returned when execute particular cypher query.
my property in graph equals (i've put in bold words using in cypher query):
1pizzeriadeicomparipourlesamateursdevraiespizzasitaliennescestadireavecpastropdepateetcuitesaufeudeboislaplacenepayepasdeminesalleettablesassezpetitesetilfautsarmerdepatiencelessamedisoirssionnapasreserveenv15minutesdattentemaislespizzassontexcellentesrestaurantmontrealmontrealquebeccanada5148435411
if execute following cypher query:
start n1=node:node_auto_index('search_field:*res* , search_field:*taurant* , search_field:*411*') return n1.search_field
my row returned! far no problem!
but when execute putting word « restaurant » this:
start n1=node:node_auto_index('search_field:*restaurant* , search_field:*411*') return n1.search_field
then no rows returned.
i tested lot of stuffs in order understand , try find pattern or can explain problem. seems length of property value might play role. know sounds strange if add 3 or more letters, let « aaa », after word restaurant in property value, (look @ bold letters close end of value):
1pizzeriadeicomparipourlesamateursdevraiespizzasitaliennescestadireavecpastropdepateetcuitesaufeudeboislaplacenepayepasdeminesalleettablesassezpetitesetilfautsarmerdepatiencelessamedisoirssionnapasreserveenv15minutesdattentemaislespizzassontexcellentesrestaurantaaamontrealmontrealquebeccanada5148435411
then, if execute same cypher query, row returned.
anyone had encountered similar problems! it's driving me crazy!
i have tested on both neo4j-enterprise 2.2.1 , latest community 3.0.0-m02. same result both of them.
any idea on or should ?
the query term passed through lucene analyzer - contents index. i'm not 100% sure think default analyzer "eats up" digits, that's why don't results.
you can supply analyzer class when index created first time. can use java api query index - allows pass in instances of lucene query
, see example @ http://blog.armbruster-it.de/2014/10/deep-dive-on-fulltext-indexing-with-neo4j/.
Comments
Post a Comment