Examples of deleteDocument()


Examples of ca.carleton.gcrc.couch.client.CouchDb.deleteDocument()

      submissionDb.updateDocument(submissionDoc);
     
    } else if( isDeletion ) {
      CouchDb targetDb = documentDbDesignDocument.getDatabase();
      JSONObject toDeleteDoc = targetDb.getDocument(docId);
      targetDb.deleteDocument(toDeleteDoc);
     
      CouchDb submissionDb = submissionDbDesignDocument.getDatabase();
      submissionDoc.getJSONObject("nunaliit_submission")
        .put("state", "complete");
      submissionDb.updateDocument(submissionDoc);
View Full Code Here

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

  }
 
  // delete the indexed record
  CatalogIndexAdapter indexAdapter = getCatalogIndexAdapter();
  if (indexAdapter != null) {
    indexAdapter.deleteDocument(uuid);
   
    if (cswRemoteRepository.isActive()) {
      if (fids.size() > 0) cswRemoteRepository.onRecordsDeleted(fids);
    }
  }
View Full Code Here

Examples of com.fourspaces.couchdb.Database.deleteDocument()

            doc = db.getDocument(entry);
        } catch (Exception e) {
            // error if the doc isn't found, we deal with the null result below
        }
        if (doc != null) {
            db.deleteDocument(doc);
            return ProviderHelper.nocontent();
        } else
            return ProviderHelper.notfound(request);
    }
View Full Code Here

Examples of com.imaginea.mongodb.services.DocumentService.deleteDocument()

                    case DELETE: {
                        if ("".equals(_id)) {
                            ApplicationException e = new DocumentException(ErrorCodes.DOCUMENT_DOES_NOT_EXIST, "Document Data Missing in Request Body");
                            result = formErrorResponse(logger, e);
                        } else {
                            result = documentService.deleteDocument(dbName, collectionName, _id);
                        }
                        break;
                    }
                    case POST: {
                        if ("".equals(_id) || "".equals(keys)) {
View Full Code Here

Examples of com.imaginea.mongodb.services.impl.DocumentServiceImpl.deleteDocument()

                    case DELETE: {
                        if ("".equals(_id)) {
                            ApplicationException e = new DocumentException(ErrorCodes.DOCUMENT_DOES_NOT_EXIST, "Document Data Missing in Request Body");
                            result = formErrorResponse(logger, e);
                        } else {
                            result = documentService.deleteDocument(dbName, collectionName, _id);
                        }
                        break;
                    }
                    case POST: {
                        if ("".equals(_id) || "".equals(keys)) {
View Full Code Here

Examples of de.chris_soft.nanoarchive.DB.deleteDocument()

   * @throws ClassNotFoundException
   * @throws SQLException
   */
  public void testDeleteDocument() throws ClassNotFoundException, SQLException {
    DB db = new DB(DB_PATH);
    db.deleteDocument(333);
    List<Long> docs = db.getDocumentsFromPath(4711);
    Collections.sort(docs);
    assertEquals(docs.size(), 1);
    assertNotSame(docs.get(0).longValue(), 333);
    db.close();
View Full Code Here

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

     
      TestDataDigester testDigester=new TestDataDigester(_fconf,data);
      BoboIndexer indexer=new BoboIndexer(testDigester,idxDir);
      indexer.index();
      IndexReader r = IndexReader.open(idxDir,false);
      r.deleteDocument(r.maxDoc() - 1);
      //r.flush();
      r.close();
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

    /** fetch the string field and compare it's content with the original one */
    String stringFldStoredTest = docFromReader.get("stringStored");
    assertTrue(stringFldStoredTest.equals(binaryValStored));
   
    /** delete the document from index */
    reader.deleteDocument(0);
    assertEquals(0, reader.numDocs());
   
    reader.close();
    dir.close();
  }
View Full Code Here

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

        IndexReader reader = IndexReader.open(dir, false);
        Term aaa = new Term("content", "aaa");
        Term bbb = new Term("content", "bbb");
        Term ccc = new Term("content", "ccc");
        assertEquals(37, reader.docFreq(ccc));
        reader.deleteDocument(0);
        assertEquals(37, reader.docFreq(aaa));
        dir.tweakBufferSizes();
        reader.deleteDocument(4);
        assertEquals(reader.docFreq(bbb), 37);
        dir.tweakBufferSizes();
View Full Code Here

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

        Term ccc = new Term("content", "ccc");
        assertEquals(37, reader.docFreq(ccc));
        reader.deleteDocument(0);
        assertEquals(37, reader.docFreq(aaa));
        dir.tweakBufferSizes();
        reader.deleteDocument(4);
        assertEquals(reader.docFreq(bbb), 37);
        dir.tweakBufferSizes();

        IndexSearcher searcher = new IndexSearcher(reader);
        ScoreDoc[] hits = searcher.search(new TermQuery(bbb), null, 1000).scoreDocs;
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.