Package org.hibernate.search.backend

Examples of org.hibernate.search.backend.OptimizeLuceneWork


    if (barrier != 0) {} //read barrier
    if ( ! getDocumentBuilders().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

  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

    if (barrier != 0) {} //read barrier
    if ( ! getDocumentBuilders().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(BatchBackend backend, 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

  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

    return results;
  }

  @Override
  public void addOptimizeAll() {
    results.add( new OptimizeLuceneWork() );
  }
View Full Code Here

    containedEntityTypes.add( entity );
  }

  @Override
  public void optimize() {
    performStreamOperation( new OptimizeLuceneWork(), false );
  }
View Full Code Here

  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

    return results;
  }

  @Override
  public void addOptimizeAll() {
    results.add( new OptimizeLuceneWork() );
  }
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.