Author: christian.bauer(a)jboss.com
Date: 2009-04-14 11:34:07 -0400 (Tue, 14 Apr 2009)
New Revision: 10398
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/User.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
Log:
JBSEAM-4098, don't index all documents when a user logs in
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/User.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/User.java 2009-04-14
14:49:30 UTC (rev 10397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/User.java 2009-04-14
15:34:07 UTC (rev 10398)
@@ -18,7 +18,6 @@
@Entity
@Table(name = "USERS")
@org.hibernate.annotations.BatchSize(size = 20)
-(a)org.hibernate.search.annotations.Indexed
public class User implements Serializable {
public static final String GUEST_USERNAME = "guest";
@@ -27,7 +26,6 @@
@Id
@GeneratedValue(generator = "wikiSequenceGenerator")
@Column(name = "USER_ID")
- @org.hibernate.search.annotations.DocumentId(name = "userId")
private Long id = null;
@Version
@@ -59,10 +57,6 @@
regex="[a-zA-Z]?[a-zA-Z0-9]+",
message="#{messages['lacewiki.entity.UsernameMustStartWithALetterAndOnlyContainLetters']}"
)
- @org.hibernate.search.annotations.Field(
- index = org.hibernate.search.annotations.Index.UN_TOKENIZED,
- store = org.hibernate.search.annotations.Store.YES
- )
private String username; // Unique and immutable
@Column(name = "PASSWORDHASH", length = 255, nullable = false)
@@ -108,10 +102,6 @@
@org.hibernate.annotations.ForeignKey(name = "FK_USER_USER_PROFILE_ID")
private UserProfile profile = new UserProfile();
- @OneToMany(fetch = FetchType.LAZY, mappedBy="createdBy")
- @org.hibernate.search.annotations.ContainedIn
- private Set<WikiNode> createdNodes; // Just for Lucene index updates of
username @Field
-
@Transient
private long ratingPoints = 0;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2009-04-14
14:49:30 UTC (rev 10397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2009-04-14
15:34:07 UTC (rev 10398)
@@ -73,8 +73,6 @@
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "CREATED_BY_USER_ID", nullable = false)
@org.hibernate.annotations.ForeignKey(name =
"FK_WIKI_NODE_CREATED_BY_USER_ID")
- @org.hibernate.search.annotations.IndexedEmbedded(prefix = "createdBy_")
- @Searchable(description = "Created By", type = SearchableType.STRING,
embeddedProperty = "username")
protected User createdBy;
@Column(name = "LAST_MODIFIED_ON", nullable = true)
@@ -89,8 +87,6 @@
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "LAST_MODIFIED_BY_USER_ID", nullable = true)
@org.hibernate.annotations.ForeignKey(name =
"FK_WIKI_NODE_LAST_MODIFIED_BY")
- @org.hibernate.search.annotations.IndexedEmbedded(prefix =
"lastModifiedBy_")
- @Searchable(description = "Last Modified By", type = SearchableType.STRING,
embeddedProperty = "username")
protected User lastModifiedBy;
@Column(name = "WRITE_ACCESS_LEVEL", nullable = false)
Show replies by date