Examples of DocData


Examples of org.apache.lucene.benchmark.byTask.feeds.DocData

      List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>(1000);
      int i = 0;
      SolrInputDocument sDoc = null;
      long start = System.currentTimeMillis();
      try {
        DocData docData = new DocData();

        while ((docData = contentSource.getNextDocData(docData)) != null && i < numDocs) {
          int mod = i % batchSize;

          sDoc = new SolrInputDocument();
          docs.add(sDoc);
          sDoc.addField("file", filePath + "_" + i);

          sDoc.addField("docid", String.valueOf(i));
          sDoc.addField("body", docData.getBody());
          sDoc.addField("doctitle", docData.getTitle());
          sDoc.addField("name_s", docData.getName());


          if (mod == batchSize - 1) {
            log.info("Sending: " + docs.size() + " docs" + " total sent for this file: " + i);
            server.add(docs);
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.feeds.DocData

      List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>(1000);
      int i = 0;
      SolrInputDocument sDoc = null;
      long start = System.currentTimeMillis();
      try {
        DocData docData = new DocData();
       
        while ((docData = contentSource.getNextDocData(docData)) != null
            && i < numDocs) {
          int mod = i % batchSize;
         
          sDoc = new SolrInputDocument();
          docs.add(sDoc);
          sDoc.addField("file", filePath + "_" + i);
         
          sDoc.addField("docid", String.valueOf(docData.getID()));
          sDoc.addField("body", docData.getBody());
          sDoc.addField("doctitle", docData.getTitle());
          sDoc.addField("name_s", docData.getName());
         
          String[] categories = docData.getProps().getProperty("category")
              .split(";;");
         
          for (String c : categories) {
            sDoc.addField("category", c);
          }
View Full Code Here

Examples of org.ogce.xregistry.doc.DocData

      List<DocData> results = new ArrayList<DocData>();
      for (int i = 0; i < hostDescData.length; i++) {
        try {
          HostDescData host = hostDescData[i];
          DocData data = new DocData(new QName(host.getResourceID()), host.getOwner());
          data.allowedAction = host.getAllowedAction();
          data.resourceID = new QName(host.getResourceID());
          results.add(data);
        } catch (XmlValueOutOfRangeException e) {
          throw new GfacException("Problem with retrieving object : " + e.getLocalizedMessage(), FaultCode.ErrorAtDependentService);
View Full Code Here

Examples of org.ogce.xregistry.doc.DocData

        return null;
      }
      List<DocData> results = new ArrayList<DocData>();
      for (int i = 0; i < serviceDescData.length; i++) {
        try {
          DocData data = new DocData(serviceDescData[i].getName(), serviceDescData[i].getOwner());
          data.allowedAction = serviceDescData[i].getAllowedAction();
          data.resourceID = serviceDescData[i].getName();
          results.add(data);
        } catch (XmlValueOutOfRangeException e) {
          throw new GfacException("Problem with retrieving object : " + e.getLocalizedMessage(), FaultCode.ErrorAtDependentService);
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.DocData

        System.out.println("ignoring date parse exception (assigning 'now') for: "+props.getProperty("date"));
        date = new Date(); // now
      }
    }
     
    return new DocData(name, bodyBuf.toString(), title, props, date);
  }
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.DocData

   (non-Javadoc)
   * @see org.apache.lucene.benchmark.byTask.feeds.DocMaker#makeDocument()
   */
  public Document makeDocument () throws Exception {
    resetLeftovers();
    DocData docData = getNextDocData();
    ///////////////////
    if(docData==null)return null;
    ///////////////////
    Document doc = createDocument(docData,0,-1);
    return doc;
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.DocData

  public Document makeDocument(int size) throws Exception {
    LeftOver lvr = (LeftOver) leftovr.get();
    if (lvr==null || lvr.docdata==null || lvr.docdata.getBody()==null || lvr.docdata.getBody().length()==0) {
      resetLeftovers();
    }
    DocData dd = (lvr==null ? getNextDocData() : lvr.docdata);
    int cnt = (lvr==null ? 0 : lvr.cnt);
    while (dd.getBody()==null || dd.getBody().length()<size) {
      DocData dd2 = dd;
      dd = getNextDocData();
      cnt = 0;
      dd.setBody(dd2.getBody() + dd.getBody());
    }
    Document doc = createDocument(dd,size,cnt);
    if (dd.getBody()==null || dd.getBody().length()==0) {
      resetLeftovers();
    } else {
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.DocData

    // 6. collect until end of doc
    sb = read("</DOC>",null,false,true);
    // this is the next document, so parse it
    Date date = new Date();
    HTMLParser p = getHtmlParser();
    DocData docData = p.parse(name, date, sb, getDateFormat(0));
    addBytes(sb.length()); // count char length of parsed html text (larger than the plain doc body text).
   
    return docData;
  }
View Full Code Here

Examples of xregistry.doc.DocData

        List<DocData> results = new ArrayList<DocData>();
        for(int i = 0;i<hostDescData.length;i++){
          try {
            HostDescData host = hostDescData[i];
            DocData data = new DocData(new QName(host.getResourceID()),host.getOwner());
            data.allowedAction = host.getAllowedAction();
            data.resourceID = new QName(host.getResourceID());
            results.add(data);
          } catch (XmlValueOutOfRangeException e) {
        log.severe("Problem with retrieving object : " + e.getLocalizedMessage(), e);
View Full Code Here

Examples of xregistry.doc.DocData

        }
        List<DocData> results = new ArrayList<DocData>();
        for(int i = 0;i<resourceData.length;i++){
            try {
          ResourceData host = resourceData[i];
            DocData data = new DocData(host.getName(),host.getOwner());
            data.allowedAction = host.getAllowedAction();
            data.resourceID = host.getName();
            data.resourcename = host.getResourceID();
            results.add(data);
            } catch (XmlValueOutOfRangeException 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.