Weird results with cypher query in Neo4j and node_auto_index
<p>I have a graph database (Neo4j) in which I configured a property to be auto indexed with full-text. Everything is working great except that I have 1 row that is not returned when I execute a particular cypher query.</p>

<p>My property in the graph equals (I've put in bold the words I am using in my cypher query):</p>

<blockquote>
  <p>1pizzeriadeicomparipourlesamateursdevraiespizzasitaliennescestadireavecpastropdepateetcuitesaufeudeboislaplacenepayepasdeminesalleettablesassezpetitesetilfautsarmerdepatiencelessamedisoirssionnapasreserveenv15minutesdattentemaislespizzassontexcellentes<strong>restaurant</strong>montrealmontrealquebeccanada5148435<strong>411</strong></p>
</blockquote>

<p>If I execute the following cypher query:</p>

<pre><code>START n1=NODE:node_auto_index('Search_Field:*res* AND Search_Field:*taurant* AND Search_Field:*411*')
RETURN n1.Search_Field
</code></pre>

<p>My row is returned! 
So far no problem!</p>

<p>But when I execute it by putting the word « restaurant » all together like this:</p>

<pre><code>START n1=NODE:node_auto_index('Search_Field:*restaurant* AND Search_Field:*411*')    
RETURN n1.Search_Field
</code></pre>

<p><strong>Then no rows are returned.</strong></p>

<p>I tested a lot of stuffs in order to understand and try to find a pattern or something that can explain the problem. It seems like the length of my property value might play a role. I know it sounds strange but if I add 3 or more letters, let say « aaa », after the word restaurant in the property value, like this (look at the bold letters close to the end of the value):</p>

<blockquote>
  <p>1pizzeriadeicomparipourlesamateursdevraiespizzasitaliennescestadireavecpastropdepateetcuitesaufeudeboislaplacenepayepasdeminesalleettablesassezpetitesetilfautsarmerdepatiencelessamedisoirssionnapasreserveenv15minutesdattentemaislespizzassontexcellentesrestaurant<strong>aaa</strong>montrealmontrealquebeccanada5148435411</p>
</blockquote>

<p>then, if I execute the same cypher query, the row is now returned.</p>

<p>Anyone had encountered similar problems! It's driving me crazy!</p>

<p>I have tested on both Neo4j-enterprise 2.2.1 and the latest Community 3.0.0-M02. Same result with both of them.</p>

<p>Any idea on where or what should I look for ?</p>