Examples of PurgeAllLuceneWork


Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    if ( this.purgeAtStart ) {
      // purgeAll for affected entities
      Set<Class<?>> targetedClasses = searchFactoryImplementor.getIndexedTypesPolymorphic( rootEntities );
      for ( Class<?> clazz : targetedClasses ) {
        // needs do be in-sync work to make sure we wait for the end of it.
        backend.doWorkInSync( new PurgeAllLuceneWork( clazz ) );
      }
      if ( this.optimizeAfterPurge ) {
        backend.optimize( targetedClasses );
      }
    }
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

      }
      else if ( workType == WorkType.DELETE || workType == WorkType.PURGE ) {
        queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
      }
      else if ( workType == WorkType.PURGE_ALL ) {
        queue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      else if ( workType == WorkType.UPDATE || workType == WorkType.COLLECTION ) {
        Document doc = getDocument( entity, id );
        /**
         * even with Lucene 2.1, use of indexWriter to update is not an option
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    if ( this.purgeAtStart ) {
      //purgeAll for affected entities
      Set<Class<?>> targetedClasses = searchFactoryImplementor.getIndexedTypesPolymorphic( rootEntities );
      for ( Class<?> clazz : targetedClasses ) {
        //needs do be in-sync work to make sure we wait for the end of it.
        backend.doWorkInSync( new PurgeAllLuceneWork( clazz ) );
      }
      if ( this.optimizeAfterPurge ) {
        optimize( targetedClasses );
      }
    }
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

     * @param luceneQueue work will be appended to this list
     */
    public void enqueueLuceneWork(List<LuceneWork> luceneQueue) {
      final Set<Entry<Serializable, PerEntityWork<T>>> entityInstances = entityById.entrySet();
      if ( purgeAll ) {
        luceneQueue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      for ( Entry<Serializable, PerEntityWork<T>> entry : entityInstances ) {
        Serializable indexingId = entry.getKey();
        PerEntityWork<T> perEntityWork = entry.getValue();
        perEntityWork.enqueueLuceneWork( entityClass, indexingId, documentBuilder, luceneQueue );
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    if ( this.purgeAtStart ) {
      // purgeAll for affected entities
      Set<Class<?>> targetedClasses = searchFactoryImplementor.getIndexedTypesPolymorphic( rootEntities );
      for ( Class<?> clazz : targetedClasses ) {
        // needs do be in-sync work to make sure we wait for the end of it.
        backend.doWorkInSync( new PurgeAllLuceneWork( clazz ) );
      }
      if ( this.optimizeAfterPurge ) {
        backend.optimize( targetedClasses );
      }
    }
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

      }
      else if ( workType == WorkType.DELETE || workType == WorkType.PURGE ) {
        queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
      }
      else if ( workType == WorkType.PURGE_ALL ) {
        queue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      else if ( workType == WorkType.UPDATE || workType == WorkType.COLLECTION ) {
        Document doc = getDocument( entity, id );
        /**
         * even with Lucene 2.1, use of indexWriter to update is not an option
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    if ( this.purgeAtStart ) {
      //purgeAll for affected entities
      Set<Class<?>> targetedClasses = searchFactoryImplementor.getIndexedTypesPolymorphic( rootEntities );
      for ( Class<?> clazz : targetedClasses ) {
        //needs do be in-sync work to make sure we wait for the end of it.
        backend.doWorkInSync( new PurgeAllLuceneWork( clazz ) );
      }
      if ( this.optimizeAfterPurge ) {
        optimize( backend, targetedClasses );
      }
    }
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    if ( this.purgeAtStart ) {
      //purgeAll for affected entities
      Set<Class<?>> targetedClasses = searchFactoryImplementor.getIndexedTypesPolymorphic( rootEntities );
      for ( Class<?> clazz : targetedClasses ) {
        //needs do be in-sync work to make sure we wait for the end of it.
        backend.doWorkInSync( new PurgeAllLuceneWork( clazz ) );
      }
      if ( this.optimizeAfterPurge ) {
        backend.optimize( targetedClasses );
      }
    }
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    results.add( new PurgeAllLuceneWork( entityClass ) );
  }
View Full Code Here

Examples of org.hibernate.search.backend.PurgeAllLuceneWork

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class,
        "entity class"
    );
    results.add( new PurgeAllLuceneWork( entityClass ) );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.