While try to query a node with auto index in cypher it returns irrelevant nodes, As shown below i queried for node having contno='GESU5697150' but it returns some other node too.
neo4j-sh (0)$ start n=node:node_auto_index(contno='GESU5697150') return n;
==> +----------------------------------------------------+
==> | n |
==> +----------------------------------------------------+
==> | Node[546290]{contno:"UACU5047693",sizetype:"40HC"} |
==> | Node[700914]{contno:"GESU5697150",sizetype:"40HC"} |
==> +----------------------------------------------------+
==> 2 rows
Is this cypher / Neo4j issue?!. Due this i am facing problem with fetching the record at java code
Ncontno = autoNodeIndex.get("contno", contno).getSingle();
it throws below error
Exception in thread "main" java.util.NoSuchElementException: More than one eleme
nt in org.neo4j.index.impl.lucene.LuceneIndex$1@211b3c6a. First element is 'Node
[546290]' and the second element is 'Node[700914]'
firstNode = null; firstNode = graphDb.createNode(); firstNode.setProperty("contno", contno); firstNode.setProperty("sizetype", sizetype); container.add(firstNode, "contno", contno); container.add(firstNode, "sizetype",sizetype);
– Jeevanantham