Exactly as the title says. I’ve created an @NodeEntity annotated POJO and in it I have a field that I want to use as an identifier that is a long that I would like to index and search around.
When I save my POJO using neo4jTemplate it saves okay, and I can see neo4j creating the index name for my Class, but when I attempt to query against the Index, I get nothing.
I’ve tried the field with both int and long, but neither seem to work. When querying, I’ve tried both 1, 1l, and "1" but none return my Node.
I can confirm that an index can be created with a Key/Value where the value is an int or a long and they work fine.
Has anyone else encountered this?
It could be that in SDN primitives gets indexed as numerical, which has a special meaning in Lucene (the default index of choice for neo4j) and they need to be queries in a similar way to be found… namely with numerical range queries. I don’t know how that would look in SDN, but by using org.apache.lucene.search.NumericRangeQuery to create Query objects to search for ranges of primitives (for example int or long) those can be queried.