Package org.hibernate.search.bridge.util.impl

Examples of org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper


      EntityIndexBinder entityIndexBinding = searchFactory.getIndexBindingForEntity(clazz);
      if (entityIndexBinding == null) {
         // it might be possible to receive not-indexes types
         return;
      }
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
      final String idInString = keyTransformationHandler.keyToString(key);
      UpdateLuceneWork updateTask = docBuilder.createUpdateWork(
            clazz,
            value,
View Full Code Here


    return fieldCacheUsage;
  }

  @Deprecated //with no replacement: too expensive to create the conversionContext each time this was needed
  public Term getTerm(Serializable id) {
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    return new Term( idKeywordName, objectToString( idBridge, idKeywordName, id, conversionContext ) );
  }
View Full Code Here

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

      }
    }
    byte[] newData = new byte[data.length - 2];
    System.arraycopy( data, 2, newData, 0, newData.length );
    Message message = SerializationHelper.toInstance( newData, Message.class );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( Operation operation : message.getOperations() ) {
      if ( operation instanceof OptimizeAll ) {
        hydrator.addOptimizeAll();
      }
      else if ( operation instanceof PurgeAll ) {
View Full Code Here

      throw log.unableToDeserializeAvroStream( e );
    }

    classReferences = asListOfString( result, "classReferences" );
    final List<GenericRecord> operations = asListOfGenericRecords( result, "operations" );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( GenericRecord operation : operations ) {
      String schema = operation.getSchema().getName();
      if ( "OptimizeAll".equals( schema ) ) {
        hydrator.addOptimizeAll();
      }
View Full Code Here

    return this;
  }

  public Query createQuery() {
    final int size = fieldContexts.size();
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    if ( size == 1 ) {
      return queryCustomizer.setWrappedQuery( createQuery( fieldContexts.get( 0 ), conversionContext ) ).createQuery();
    }
    else {
      BooleanQuery aggregatedFieldsQuery = new BooleanQuery( );
View Full Code Here

    this.fieldContexts = fieldContexts;
  }

  public Query createQuery() {
    final int size = fieldContexts.size();
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    if ( size == 1 ) {
      return queryCustomizer.setWrappedQuery( createQuery( fieldContexts.get( 0 ), conversionContext ) ).createQuery();
    }
    else {
      BooleanQuery aggregatedFieldsQuery = new BooleanQuery();
View Full Code Here

      throw log.unableToDeserializeAvroStream( e );
    }

    classReferences = asListOfString( result, "classReferences" );
    final List<GenericRecord> operations = asListOfGenericRecords( result, "operations" );
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    for ( GenericRecord operation : operations ) {
      String schema = operation.getSchema().getName();
      if ( "OptimizeAll".equals( schema ) ) {
        hydrator.addOptimizeAll();
      }
View Full Code Here

  private void indexAllQueue(Session session) {
    final InstanceInitializer sessionInitializer = new HibernateSessionLoadingInitializer(
        (SessionImplementor) session
    );
    try {
      ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();
      while ( true ) {
        List<?> takeList = source.take();
        if ( takeList == null ) {
          break;
        }
View Full Code Here

        fieldNames[index] = fieldsContextIterator.next().getField();
      }
      //TODO should we keep the fieldToAnalyzerMap around to pass to the analyzer?
      Map<String,String> fieldToAnalyzerMap = new HashMap<String, String>( );
      //FIXME by calling documentBuilder we don't honor .comparingField("foo").ignoreFieldBridge(): probably not a problem in practice though
      maybeDocument = documentBuilder.getDocument( (T) input, null, fieldToAnalyzerMap, null, new ContextualExceptionBridgeHelper(), fieldNames );
      vectors = null;
    }
    else {
      vectors = indexReader.getTermVectors( documentNumber );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper

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.