Examples of deleteDocuments()


Examples of com.browseengine.bobo.api.BoboIndexReader.deleteDocuments()

    doTest(br, 3, answer, new String[] {"1", "2", "7"});

    try
    {
      reader = newIndexReader(false);
      reader.deleteDocuments(new Term("id", "1"));
      reader.deleteDocuments(new Term("id", "2"));
     
      br = new BrowseRequest();
      br.setCount(10);
      br.setOffset(0);
View Full Code Here

Examples of com.browseengine.bobo.api.BoboIndexReader.deleteDocuments()

    try
    {
      reader = newIndexReader(false);
      reader.deleteDocuments(new Term("id", "1"));
      reader.deleteDocuments(new Term("id", "2"));
     
      br = new BrowseRequest();
      br.setCount(10);
      br.setOffset(0);
View Full Code Here

Examples of com.esri.gpt.catalog.context.CatalogIndexAdapter.deleteDocuments()

  if (uuids.size() > 0) {
    CatalogIndexAdapter indexAdapter = getCatalogIndexAdapter();
    if (indexAdapter != null) {
      String sMsg = "Deleting "+uuids.size()+" unreferenced documents from the catalog index.";
      LogUtil.getLogger().info(sMsg);
      indexAdapter.deleteDocuments(uuids.toArray(new String[0]));
     
      if (cswRemoteRepository.isActive()) {
        if (fids.size() > 0) cswRemoteRepository.onRecordsDeleted(fids);
      }
    }
View Full Code Here

Examples of de.bwaldvogel.mongo.backend.MongoCollection.deleteDocuments()

            MongoCollection collection = resolveCollection(collectionName, false);
            int n;
            if (collection == null) {
                n = 0;
            } else {
                n = collection.deleteDocuments(selector, limit);
            }
            final BSONObject result = new BasicBSONObject("n", Integer.valueOf(n));
            putLastResult(channel, result);
            return result;
        } catch (MongoServerError e) {
View Full Code Here

Examples of org.apache.lucene.index.IndexModifier.deleteDocuments()

            }

            // Delete any conversations found -- they may have already been indexed, but
            // updated since then.
            for (long conversationID : conversationIDs) {
                writer.deleteDocuments(new Term("conversationID", Long.toString(conversationID)));
            }

            // Load meta-data for each conversation.
            Map<Long, Boolean> externalMetaData = new HashMap<Long, Boolean>();
            for (long conversationID : conversationIDs) {
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.deleteDocuments()

    IndexReader reader = null;
    try{
      reader = getReader(doc.name())
      String pvalue = getField(doc, doc.getKeywordField());
      Term keyTerm = new Term(doc.getKeywordField(), pvalue);
      return reader.deleteDocuments(keyTerm);
    }catch(Exception e){
      log.error("Error where delete index of "+ doc, e);
    }finally{
      if(reader!=null)
      try{
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.deleteDocuments()

    if (oDir.exists()) {
      File[] aSegments = oDir.listFiles();
      if (null!=aSegments) {
      if (aSegments.length>0) {
          IndexReader oReader = IndexReader.open(sDirectory);
          int iDeleted = oReader.deleteDocuments(new Term("container", sFolder));
          oReader.close();
      } // fi
      } // fi
    } else {
      FileSystem oFS = new FileSystem();
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.deleteDocuments()

    if (DebugFile.trace)
      DebugFile.writeln("new IndexWriter(...)");

  if (!bNewIndex) {
      IndexReader oIRdr = IndexReader.open(sDirectory);
      oIRdr.deleteDocuments(new Term("guid",sGuid));
      oIRdr.close();
  }

    IndexWriter oIWrt = new IndexWriter(sDirectory, (Analyzer) oAnalyzer.newInstance(), bNewIndex);
 
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.deleteDocuments()

    if (DebugFile.trace)
      DebugFile.writeln("IndexReader.open("+sDirectory+")");

    IndexReader oIRdr = IndexReader.open(sDirectory);
    oIRdr.deleteDocuments(new Term("guid", sGuid));
    oIRdr.close();

    IndexWriter oIWrt = new IndexWriter(sDirectory, (Analyzer) oAnalyzer
        .newInstance(), bNewIndex);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.deleteDocuments()

    if (oDir.exists()) {
      File[] aFiles = oDir.listFiles();
      if (null!=aFiles) {
        if (aFiles.length>0) {
          IndexReader oReader = IndexReader.open(sDirectory);     
          int iDeleted = oReader.deleteDocuments(new Term("workarea", sWorkArea));
          oReader.close();
        }
      }
    } else {
      FileSystem oFS = new FileSystem();
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.