[Neo] Newbie IndexService question: How is equality defined between values in the index
mattias at neotechnology.com
Fri Feb 12 11:43:27 CET 2010
Yep the answer is simple, it does a .toString() on the object and
stores that string (since Lucene handles only strings as values). And
when calling getNodes() it matches your suppliedValue.toString() with
the values stored in lucene.
Are you satisfied with that answer? I can imagine that in some remote
case this (string conversion) could be a problem, but it works great
for the majority of users using it.
2010/2/12 Thomas Andersson <greddbullen at gmail.com>:
> I have just started to use neo4j and so far I really like it, but I
> have a question about the IndexService interface.
> When indexing you provide a key of type String and a value of type Object.
> When doing lookup, you provide a value Object to look for to match
> with the indexed value object. How is the matching done? Is there a
> comparison of value objects using Object.equals, or what constitutes a
> Also, since the index can be persisted to the file system, the value
> objects must also be persisted. I am a little confused that there is
> no requirement that the value object must be serializable or something
> like that.
> Any thoughts on this?
> Best Regards,
> Neo mailing list
> User at lists.neo4j.org
Mattias Persson, [mattias at neotechnology.com]
Neo Technology, www.neotechnology.com
More information about the User