Package org.hibernate.search.backend

Examples of org.hibernate.search.backend.OptimizeLuceneWork


  public void optimize(Class entityType) {
    if ( !getDocumentBuildersIndexedEntities().containsKey( entityType ) ) {
      throw new SearchException( "Entity not indexed: " + entityType );
    }
    List<LuceneWork> queue = new ArrayList<LuceneWork>( 1 );
    queue.add( new OptimizeLuceneWork( entityType ) );
    getBackendQueueProcessorFactory().getProcessor( queue ).run();
  }
View Full Code Here


    } //read barrier
    if ( !getDocumentBuildersIndexedEntities().containsKey( entityType ) ) {
      throw new SearchException( "Entity not indexed: " + entityType );
    }
    List<LuceneWork> queue = new ArrayList<LuceneWork>( 1 );
    queue.add( new OptimizeLuceneWork( entityType ) );
    getBackendQueueProcessorFactory().getProcessor( queue ).run();
  }
View Full Code Here

  }

  private void optimize(Set<Class<?>> targetedClasses) {
    for ( Class<?> clazz : targetedClasses ) {
      //TODO the backend should remove duplicate optimize work to the same DP (as entities might share indexes)
      backend.doWorkInSync( new OptimizeLuceneWork( clazz ) );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.backend.OptimizeLuceneWork

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.