Package org.hibernate.search.exception

Examples of org.hibernate.search.exception.SearchException


    final Class<?> clazzDef = classForName( classNameToLoad, componentDescription, serviceManager );
    try {
      return clazzDef.asSubclass( targetSuperType );
    }
    catch (ClassCastException cce) {
      throw new SearchException(
          "Unable to load class for " + componentDescription + ". Configured implementation " + classNameToLoad +
              " is not assignable to type " + targetSuperType
      );
    }
  }
View Full Code Here


      return this;
    }

    public Builder analyzerDiscriminator(Discriminator discriminator, XMember discriminatorGetter) {
      if ( this.discriminator != null ) {
        throw new SearchException(
            "Multiple AnalyzerDiscriminator defined in the same class hierarchy: " + this.indexedType
                .getName()
        );
      }
View Full Code Here

  }

  @Override
  public void addTokenTrackingAttribute(List<Integer> positions) {
    //TokenTrackingAttribute is no longer available
    throw new SearchException( "Serialization of TokenTrackingAttribute is no longer supported" );
  }
View Full Code Here

  }

  private String objectIdInString(Class<?> entityClass, Serializable id, ConversionContext conversionContext) {
    EntityIndexBinding indexBindingForEntity = searchFactory.getIndexBinding( entityClass );
    if ( indexBindingForEntity == null ) {
      throw new SearchException( "Unable to find entity type metadata while deserializing: " + entityClass );
    }
    DocumentBuilderIndexedEntity documentBuilder = indexBindingForEntity.getDocumentBuilder();
    return documentBuilder.objectToString( documentBuilder.getIdKeywordName(), id, conversionContext );
  }
View Full Code Here

      }
      case WITH_POSITIONS_OFFSETS: {
        return TermVector.WITH_POSITION_OFFSETS;
      }
      default: {
        throw new SearchException( "Unknown term vector type" );
      }
    }
  }
View Full Code Here

        }
        if ( currentEntry.documentId == index ) {
          return currentEntry.getDistance( center );
        }
      }
      throw new SearchException( "Unexpected index: this documentId was not collected" );
    }
View Full Code Here

      catch (InterruptedException e) {
        log.interruptedWhileWaitingForIndexActivity( e );
        Thread.currentThread().interrupt();
      }
      catch (ExecutionException e) {
        throw new SearchException( "Error applying updates to the Lucene index", e.getCause() );
      }
    }
    else {
      resources.getQueueingExecutor().execute( luceneBackendQueueProcessor );
    }
View Full Code Here

  public void performWork(Work work, TransactionContext transactionContext) {
    final Class<?> entityType = instanceInitializer.getClassFromWork( work );
    EntityIndexBinding indexBindingForEntity = factory.getIndexBinding( entityType );
    if ( indexBindingForEntity == null
        && factory.getDocumentBuilderContainedEntity( entityType ) == null ) {
      throw new SearchException( "Unable to perform work. Entity Class is not @Indexed nor hosts @ContainedIn: " + entityType );
    }
    work = interceptWork( indexBindingForEntity, work );
    if ( work == null ) {
      //nothing to do
      return;
View Full Code Here

        member,
        reflectionManager,
        configContext.getServiceManager()
    );
    if ( !( idBridge instanceof TwoWayFieldBridge ) ) {
      throw new SearchException(
          "Bridge for document id does not implement TwoWayFieldBridge: " + member.getName()
      );
    }

    Field.TermVector termVector = AnnotationProcessingHelper.getTermVector( TermVector.NO );
View Full Code Here

        Class<? extends Annotation> jpaIdClass =
            ClassLoaderHelper.classForName( "javax.persistence.Id", configContext.getServiceManager() );
        jpaId = member.getAnnotation( jpaIdClass );
      }
      catch (ClassLoadingException e) {
        throw new SearchException( "Unable to load @Id.class even though it should be present ?!" );
      }
      if ( jpaId != null ) {
        typeMetadataBuilder.jpaProperty( member );
        if ( documentIdAnnotation == null ) {
          log.debug( "Found JPA id and using it as document id" );
View Full Code Here

TOP

Related Classes of org.hibernate.search.exception.SearchException

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.