[Neo4j] Spring Data + Neo4j - Indexing Question

kv8 karthik.rv at gmail.com
Tue Sep 27 19:20:49 CEST 2011

I have a possible issue with the Lucene index not being updated when I update
a node with Indexed variables. Will appreciate any help...this is what I
have so far ..made the code concise for readability ..

Class User {
    String userName;

    String firstName;

    String lastName;
    Boolean communityMember;

    @RelatedTo(type = LLPRelations.OWN, direction = Direction.INCOMING)
    Set<Club> clubsOwned;

    @Indexed(indexName = "user-full-name", fulltext = true)
    String fullName;

public void shouldUpdateIndexWhenEntityChanges() {
User u1 = createUser(f1,l1....true -> Boolean for community member);
createUser(f2,l2....true -> Boolean for community member);
userRepository.findAllByPropertyValue(User.COMMUNITY_MEMBER, true) --->
returns 2
userRepository.findAllByPropertyValue(User.COMMUNITY_MEMBER, true) --->
returns 2 again

My understanding was the index's are automatically updated with the value
changes. Am I missing something ?

Thanks much folks !

View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Spring-Data-Neo4j-Indexing-Question-tp3373307p3373307.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.

More information about the User mailing list