Examples of AddLuceneWork


Examples of org.hibernate.search.backend.AddLuceneWork

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

Examples of org.hibernate.search.backend.AddLuceneWork

  }

  public AddLuceneWork createAddWork(Class<T> entityClass, T entity, Serializable id, String idInString, InstanceInitializer sessionInitializer, ConversionContext conversionContext) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer, conversionContext );
    final AddLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

Examples of org.hibernate.search.backend.AddLuceneWork

  }

  public AddLuceneWork createAddWork(Class<T> entityClass, T entity, Serializable id, String idInString, InstanceInitializer sessionInitializer, ConversionContext conversionContext) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer, conversionContext );
    final AddLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

Examples of org.hibernate.search.backend.AddLuceneWork

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

Examples of org.hibernate.search.backend.AddLuceneWork

  }

  public AddLuceneWork createAddWork(Class<T> entityClass, T entity, Serializable id, String idInString, ClassNavigator sessionInitializer) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer );
    final AddLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc );
    }
    else {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
    }
    return addWork;
  }
View Full Code Here

Examples of org.hibernate.search.backend.AddLuceneWork

  }

  public AddLuceneWork createAddWork(Class<T> entityClass, T entity, Serializable id, String idInString, boolean isBatch) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap );
    AddLuceneWork addWork;
    if ( fieldToAnalyzerMap.isEmpty() ) {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc, isBatch );
    }
    else {
      addWork = new AddLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap, isBatch );
    }
    return addWork;
  }
View Full Code Here

Examples of org.hibernate.search.backend.AddLuceneWork

        .setFieldName(docBuilder.getIdKeywordName())
        .setFieldBridge(idBridge);
    String idInString = contextualBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

Examples of org.hibernate.search.backend.AddLuceneWork

    finally {
      conversionContext.popProperty();
    }
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork(
        clazz,
        entity,
        id,
        idInString,
        sessionInitializer,
View Full Code Here

Examples of org.hibernate.search.backend.AddLuceneWork

    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

Examples of org.hibernate.search.backend.AddLuceneWork

    DocumentBuilderIndexedEntity docBuilder = documentBuilders.get( clazz );
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    String idInString = idBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
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.