[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 ..
@NodeEntity
Class User {
@Indexed
String userName;
String firstName;
String lastName;
@Indexed
Boolean communityMember;
@RelatedTo(type = LLPRelations.OWN, direction = Direction.INCOMING)
Set<Club> clubsOwned;
@Indexed(indexName = "user-full-name", fulltext = true)
String fullName;
}
@test
@Transactional
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
u1.setIsCommunityMember(false);
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