Examples of LuceneIndexingException


Examples of com.impetus.kundera.index.LuceneIndexingException

    }

    @Test
    public void testLuceneIndexingException()
    {
        LuceneIndexingException exception = new LuceneIndexingException("Error with string");
        Assert.assertNotNull(exception);
       
        exception = new LuceneIndexingException(new RuntimeException());
        Assert.assertNotNull(exception);
   
        exception = new LuceneIndexingException("KunderaTests",new RuntimeException());
        Assert.assertNotNull(exception);
       
        exception = new LuceneIndexingException();
        Assert.assertNotNull(exception);
    }
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

   * @see IndexWriterFactoryUtils#getIndexWriter(IndexFactory)
   * @see IndexWriterFactoryUtils#releaseIndexWriter(IndexFactory, IndexWriter)
   */
  public void index(String dirToParse,boolean optimizeIndex) {
    if( !checkBaseDirectory(dirToParse) ) {
      throw new LuceneIndexingException("The base directory doesn't exist!");
    }

    IndexWriter writer = IndexWriterFactoryUtils.getIndexWriter(getIndexFactory());
    try {
      File file=new File(dirToParse);
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

      this.indexReader = indexReader;
    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      if( INDEX_READER_FORBIDDEN_METHODS.indexOf(method.getName())!=-1 ) {
        throw new LuceneIndexingException("Not authorized operation in this context.");
      } else {
        return method.invoke(indexReader, args);
      }
    }
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

      this.indexWriter = indexWriter;
    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      if( INDEX_WRITER_FORBIDDEN_METHODS.indexOf(method.getName())!=-1 ) {
        throw new LuceneIndexingException("Not authorized operation in this context.");
      } else {
        return method.invoke(indexWriter, args);
      }
    }
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

   * @see IndexWriterFactoryUtils#getIndexWriter(IndexFactory)
   * @see IndexWriterFactoryUtils#releaseIndexWriter(IndexFactory, IndexWriter)
   */
  public void index(String dirToParse, boolean optimizeIndex) {
    if( !checkBaseDirectory(dirToParse) ) {
      throw new LuceneIndexingException("The base directory doesn't exist!");
    }

    LuceneIndexWriter writer = IndexWriterFactoryUtils.getIndexWriter(getIndexFactory());
    try {
      File file = new File(dirToParse);
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

      try {
        return handler.getDocument(request.getDescription(), rs);
      } catch (SQLException ex) {
        throw ex;
      } catch (Exception ex) {
        throw new LuceneIndexingException("Error during the indexing of the ResultSet.", ex);
      }
    }
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

    return getIndexReader(true);
  }

  public LuceneIndexReader getIndexReader(boolean throwException) {
    if( indexReader==null && throwException) {
      throw new LuceneIndexingException("You can not used an IndexReader in this context.");
    }
    return indexReader;
  }
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

    return getIndexWriter(true);
  }

  public LuceneIndexWriter getIndexWriter(boolean throwException) {
    if( indexWriter==null && throwException ) {
      throw new LuceneIndexingException("You can not used an IndexWriter in this context.");
    }
    return indexWriter;
  }
View Full Code Here

Examples of org.springmodules.lucene.index.LuceneIndexingException

        addDocument(documentCreator.createDocumentFromInputStream(inputStream), analyzer);
      }
    } catch(DocumentHandlerException ex) {
      throw ex;
    } catch(Exception ex) {
      throw new LuceneIndexingException("Error during adding a document.", ex);
    } finally {
      IOUtils.closeInputStream(inputStream);
    }
  }
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.