Skip to content

Commit

Permalink
HSEARCH-471 Disable dirty checking optimization when interceptor is used
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelbernard authored and Sanne committed Feb 28, 2012
1 parent 7f74e28 commit c645193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -407,7 +407,10 @@ private void initDocumentBuilders(SearchConfiguration cfg, BuildContext buildCon

Class mappedClass = classMappings.get( mappedXClass );
MutableEntityIndexBinding mappedEntity = indexesFactory.buildEntityIndexBinding( mappedXClass, mappedClass, cfg, buildContext );

//interceptor might use non indexed state
if ( mappedEntity.getIndexingActionInterceptor() != null ) {
optimizationBlackListedTypes.add( mappedXClass );
}
// Create all DocumentBuilderIndexedEntity
//FIXME DocumentBuilderIndexedEntity needs to be built by a helper method receiving Class<T> to infer T properly
//XClass unfortunately is not (yet) genericized: TODO?
Expand Down
Expand Up @@ -44,7 +44,7 @@ public class Blog {
public void setTitle(String title) { this.title = title; }
private String title;

@Field
//state used by interceptor but not indexed on purpose to test optimization disablement
public BlogStatus getStatus() { return status; }
public void setStatus(BlogStatus status) { this.status = status; }
private BlogStatus status;
Expand Down

0 comments on commit c645193

Please sign in to comment.