Package org.hibernate.search.backend

Examples of org.hibernate.search.backend.LuceneWork


    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    LuceneWork result = new DeleteLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass
    );
    results.add( result );
View Full Code Here


    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    LuceneWork result = new AddLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    LuceneWork result = new UpdateLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        "entity class",
        searchFactory.getServiceManager()
    );
    LuceneWork result = new DeleteLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass
    );
    results.add( result );
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        "entity class",
        searchFactory.getServiceManager()
    );
    LuceneWork result = new AddLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        "entity class",
        searchFactory.getServiceManager()
    );
    LuceneWork result = new UpdateLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass,
        getLuceneDocument(),
        fieldToAnalyzerMap
View Full Code Here

      searchForContainers = true;
    }
    else if ( workType == WorkType.INDEX ) {
      Document doc = getDocument( entity, id );
      queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
      LuceneWork work = new AddLuceneWork( id, idInString, entityClass, doc );
      work.setBatch( true );
      queue.add( work );
      searchForContainers = true;
    }

    else {
View Full Code Here

     */
    final int size = luceneQueue.size();
    List<Integer> toDelete = new ArrayList<Integer>( size );
    Map<DuplicatableWork, Integer> workByPosition = new HashMap<DuplicatableWork, Integer>( size );
    for ( int index = 0 ; index < size; index++ ) {
      LuceneWork work = luceneQueue.get( index );
      if ( work instanceof AddLuceneWork ) {
        DuplicatableWork dupWork = new DuplicatableWork( work );
        final Integer oldIndex = workByPosition.get( dupWork );
        if ( oldIndex != null ) {
          toDelete.add(oldIndex);
View Full Code Here

    doc.add( field );
    field = new Field( "id", "1", Field.Store.YES, Field.Index.NOT_ANALYZED );
    doc.add( field );
    field = new Field( "logo", shirt.getLogo(), Field.Store.NO, Field.Index.ANALYZED );
    doc.add( field );
    LuceneWork luceneWork = new AddLuceneWork(
        shirt.getId(), String.valueOf( shirt.getId() ), shirt.getClass(), doc
    );
    List<LuceneWork> queue = new ArrayList<LuceneWork>();
    queue.add( luceneWork );
    return queue;
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    LuceneWork result = new DeleteLuceneWork(
        id,
        objectIdInString( entityClass, id, conversionContext ),
        entityClass
    );
    results.add( result );
View Full Code Here

TOP

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

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.