Examples of SearchException


Examples of org.hibernate.search.SearchException

      reader = IndexReader.open( directory, false );
      log.trace( "IndexReader opened" );
    }
    catch ( IOException e ) {
      reader = null;
      throw new SearchException( "Unable to open IndexReader on directory " + directory, e );
    }
    return reader;
  }
View Full Code Here

Examples of org.hibernate.search.SearchException

      try {
        toClose.close();
        log.trace( "IndexReader closed" );
      }
      catch ( IOException e ) {
        throw new SearchException( "Exception while closing IndexReader", e );
      }
    }
    else {
      throw new AssertionFailure( "No IndexReader open to close." );
    }
View Full Code Here

Examples of org.hibernate.search.SearchException

      indexingParams.applyToWriter( writer, batchmode );
      log.trace( "IndexWriter opened" );
    }
    catch ( IOException e ) {
      writer = null;
      throw new SearchException( "Unable to open IndexWriter", e );
    }
    return writer;
  }
View Full Code Here

Examples of org.hibernate.search.SearchException

      try {
        writer.commit();
        log.trace( "Index changes commited." );
      }
      catch ( IOException e ) {
        throw new SearchException( "Exception while commiting index changes", e );
      }
    }
    else {
      throw new AssertionFailure( "No open IndexWriter to commit changes." );
    }
View Full Code Here

Examples of org.hibernate.search.SearchException

      try {
        toClose.close();
        log.trace( "IndexWriter closed" );
      }
      catch ( IOException e ) {
        throw new SearchException( "Exception while closing IndexWriter", e );
      }
    }
    else {
      throw new AssertionFailure( "No open IndexWriter to close" );
    }
View Full Code Here

Examples of org.hibernate.search.SearchException

    //processedClasses.remove( clazz ); for the sake of completness
    this.analyzer.setGlobalAnalyzer( rootPropertiesMetadata.analyzer );
    if ( entityState == EntityState.INDEXED && idKeywordName == null ) {
      // if no DocumentId then check if we have a ProvidedId instead
      ProvidedId provided = findProvidedId( clazz, reflectionManager );
      if ( provided == null ) throw new SearchException( "No document id in: " + clazz.getName() );

      idBridge = BridgeFactory.extractTwoWayType( provided.bridge() );
      idKeywordName = provided.name();
    }
View Full Code Here

Examples of org.hibernate.search.SearchException

    else {
      try {
        return (Analyzer) analyzerClass.newInstance();
      }
      catch (ClassCastException e) {
        throw new SearchException(
            "Lucene analyzer does not implement " + Analyzer.class.getName() + ": " + analyzerClass.getName(), e
        );
      }
      catch (Exception e) {
        throw new SearchException( "Failed to instantiate lucene analyzer with type " + analyzerClass.getName(), e );
      }
    }
  }
View Full Code Here

Examples of org.hibernate.search.SearchException

      //TODO: similarity form @IndexedEmbedded are not taken care of. Exception??
      if ( isRoot ) {
        org.hibernate.search.annotations.Similarity similarityAnn = currClass.getAnnotation( org.hibernate.search.annotations.Similarity.class );
        if ( similarityAnn != null ) {
          if ( similarityClass != null ) {
            throw new SearchException( "Multiple Similarities defined in the same class hierarchy: " + beanClass.getName() );
          }
          similarityClass = similarityAnn.impl();
        }
      }
View Full Code Here

Examples of org.hibernate.search.SearchException

      else {
        elementClass = reflectionManager.toXClass( embeddedAnn.targetElement() );
      }
      if ( maxLevel == Integer.MAX_VALUE //infinite
          && processedClasses.contains( elementClass ) ) {
        throw new SearchException(
            "Circular reference. Duplicate use of "
                + elementClass.getName()
                + " in root entity " + beanClass.getName()
                + "#" + buildEmbeddedPrefix( prefix, embeddedAnn, member )
        );
View Full Code Here

Examples of org.hibernate.search.SearchException

        FieldBridge fieldBridge = BridgeFactory.guessType( null, member, reflectionManager );
        if ( fieldBridge instanceof TwoWayFieldBridge ) {
          idBridge = (TwoWayFieldBridge) fieldBridge;
        }
        else {
          throw new SearchException(
              "Bridge for document id does not implement TwoWayFieldBridge: " + member.getName() );
        }
        idBoost = getBoost( member, null );
        setAccessible( member );
        idGetter = member;
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.