Examples of IndexException


Examples of org.dbpedia.spotlight.exceptions.IndexException

                Document docForResource = uriToDocumentMap.get(uri);
                mWriter.addDocument(docForResource);
                numSavedDocs++;
            }
        } catch (IOException e) {
            throw new IndexException(e);
        }
        LOG.info(String.format("Saved %s resources to lucene index.",numSavedDocs));
    }
View Full Code Here

Examples of org.dbpedia.spotlight.exceptions.IndexException

        try {
            mWriter.commit();
            LOG.info("Expunge deletes...");
            mWriter.expungeDeletes();
        } catch (IOException e) {
            throw new IndexException("Error while performing final commit for index enrichment.", e);
        }
        //LOG.info("Optimizing...");
        //mWriter.optimize();
        LOG.info("Done.");
    }
View Full Code Here

Examples of org.dbpedia.spotlight.exceptions.IndexException

        //LOG.debug("Indexing occurrence");
        Document newDoc = mLucene.createDocument(resourceOccurrence);
        try {
            mWriter.addDocument(newDoc); // do not commit for faster indexing.
        } catch (IOException e) {
            throw new IndexException("Error adding occurrence to the index. ",e);
        }
    }
View Full Code Here

Examples of org.dbpedia.spotlight.exceptions.IndexException

                addOccurrence(resourceOccurrence);
            }
            mWriter.commit(); //Commit for every occurrence is not efficient, but we do because we merge every new occurrence into a resource.
            searcher.close();
        } catch (IOException e) {
            throw new IndexException(e);
        }
    }
View Full Code Here

Examples of org.grails.plugins.elasticsearch.exception.IndexException

    public XContentBuilder toJSON(Object instance) {
        try {
            return jsonDomainFactory.buildJSON(instance);
        } catch (Exception e) {
            throw new IndexException("Failed to marshall domain instance [" + instance + "]", e);
        }
    }
View Full Code Here

Examples of org.grails.plugins.elasticsearch.exception.IndexException

                completeListener = new OperationBatch(0, toIndex, toDelete);
                operationBatchList.add(completeListener);
                try {
                    bulkRequestBuilder.execute().addListener(completeListener);
                } catch (Exception e) {
                    throw new IndexException("Failed to index/delete " + bulkRequestBuilder.numberOfActions(), e);
                }
            }
        }

        return completeListener;
View Full Code Here

Examples of org.waveprotocol.box.server.waveserver.IndexException

    if (directory == null) {
      File file;
      try {
        file = FileUtils.createDirIfNotExists(directoryName, "");
      } catch (PersistenceException e) {
        throw new IndexException("Cannot create index directory " + directoryName, e);
      }
      try {
        directory = FSDirectory.open(file);
      } catch (IOException e) {
        throw new IndexException("Cannot open index directory " + directoryName, e);
      }
    }
  }
View Full Code Here

Examples of org.waveprotocol.box.server.waveserver.IndexException

    if (directory == null) {
      File file;
      try {
        file = FileUtils.createDirIfNotExists(directoryName, "");
      } catch (PersistenceException e) {
        throw new IndexException("Cannot create index directory " + directoryName, e);
      }
      try {
        directory = FSDirectory.open(file);
      } catch (IOException e) {
        throw new IndexException("Cannot open index directory " + directoryName, e);
      }
    }
  }
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.