Hi,
I have found a surprising behavior in the BatchInserterIndex in the new 1.3
series. If I want to index a non-string:
// Index node
Map<String, Object> props = new HashMap<String, Object>();
props.put( "key", 123L );
index.add( id, props );
index.flush();
// Search for node
IndexHits<Node> result = index.get("key", 123L);
//result.size() => 0
The above code always returns an empty result set. But if instead we add the
value as a string, but still search for an integer, we get a result.
// Index node
Map<String, Object> props = new HashMap<String, Object>();
props.put( "key", Long.toString(123L) );
index.add( id, props );
index.flush();
// Search for node
IndexHits<Node> result = index.get("key", 123L);
//result.size() => 1
This seems rather surprising to me. I would not have been surprised if the
opposite was true, but this way round was unexpected.
Is this correct behavior? And if so, why?
Regards, Craig
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user