Examples of nextDocument()


Examples of com.google.enterprise.connector.otex.LivelinkDocumentList.nextDocument()

      throws RepositoryException
  {
    mgr.setBatchHint(1);    // we only want the first result...
    LivelinkDocumentList docList = (LivelinkDocumentList) mgr.startTraversal();
    if (docList != null)
      return docList.nextDocument();
    else
      return null;
  }

  private void processResultSet(LivelinkDocumentList docList)
View Full Code Here

Examples of com.google.enterprise.connector.sharepoint.spiimpl.SPDocumentList.nextDocument()

        curr_webState, iPageSizeHint, false);
    int numDocs = 0;
    try {
      System.out.println("Documents found - ");
      if (rs != null) {
        SPDocument pm = (SPDocument) rs.nextDocument();
        while (pm != null) {
          System.out.println("<document>");
          final Property lastModProp = pm.findProperty(SpiConstants.PROPNAME_LASTMODIFIED);
          if (lastModProp != null) {
            System.out.println("<lastModify>"
View Full Code Here

Examples of com.google.enterprise.connector.spi.DocumentList.nextDocument()

    tm.setBatchHint(20);
    DocumentList docList = tm.startTraversal();
    assertNotNull("startTraversal returned a null document list", docList);
    while (docList != null) {
      Document doc;
      while (null != (doc = docList.nextDocument())) {
        documents.add((NotesConnectorDocument) doc);
      }
      String checkpoint = docList.checkpoint();
      // Resume traversal.
      tm.setBatchHint(20);
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentIterator.nextDocument()

    int documentPointer = 0, documentsInBatch = 0;
    long batchStartTime = System.currentTimeMillis();
    boolean outOfMemoryError = false;

    while ( ( document = iterator.nextDocument() ) != null ) {
     
      long overallTerms = 0;
      if ( building ) builder.startDocument( document.title(), document.uri() );
      for ( int i = 0; i < numberOfIndexedFields; i++ ) {
        switch ( factory.fieldType( indexedField[ i ] ) ) {
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentIterator.nextDocument()

    ProgressLogger progressLogger = new ProgressLogger( LOGGER, jsapResult.getLong( "logInterval" ), "documents" );
    if ( documentSequence instanceof DocumentCollection ) progressLogger.expectedUpdates = ((DocumentCollection)documentSequence).size();
    progressLogger.start( "Scanning..." );
   
    while( ( document = documentIterator.nextDocument() ) != null ) {
      if ( uriStream != null ) {
        s.replace( document.uri() );
        s.replace( LINE_TERMINATORS, SPACES );
        s.writeUTF8( uriStream );
        uriStream.write( '\n' );
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentIterator.nextDocument()

      }
    }

    int documentIndex = 0;

    while ( ( document = iterator.nextDocument() ) != null ) {
      for ( int i = 0; i < field.length; i++ ) {
        switch ( factory.fieldType( field[ i ] ) ) {
        case TEXT:
          processDocument( document.wordReader( field[ i ] ).setReader( (Reader)document.content( field[ i ] ) ), map == null ? documentIndex : map[ documentIndex ], 0, termMap[ i ],
              index[ i ].termProcessor );
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexIterator.nextDocument()

        i = index[ currIndex ];
        ii = indexIterator[ currIndex ];

        for( int j = frequency[ currIndex ]; j-- != 0; ) {
          obs = indexWriter.newDocumentRecord();
          currDoc = ii.nextDocument() + numPrevDocs;
          indexWriter.writeDocumentPointer( obs, currDoc );

          if ( i.hasPayloads ) indexWriter.writePayload( obs, ii.payload() );

          if ( i.hasCounts ) {
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexIterator.nextDocument()

        }

        // If we just wrote the last document pointer of this term in index j, we dequeue it.
        if ( --frequency[ currIndex ] == 0 ) documentQueue.dequeue();
        else {
          doc[ currIndex ] = ir.nextDocument();
          documentQueue.changed();
        }
        lastIndex = currIndex;
      }
    }
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexIterator.nextDocument()

        }
       
        // If we just wrote the last document pointer of this term in index j, we dequeue it.
        if ( --frequency[ currIndex ] == 0 ) documentQueue.dequeue();
        else {
          doc[ currIndex ] = ii.nextDocument();
          documentQueue.changed();
        }
      } while( ! documentQueue.isEmpty() && doc[ currIndex = documentQueue.firstInt() ] == currDoc );
 
      if ( totalCount > maxCount ) maxCount = totalCount;
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexIterator.nextDocument()

      for ( int i = k = 0; i < terms; i++ ) {
        indexIterator = indexReader.nextIterator();
        frequency = indexIterator.frequency();
        if ( ! index.hasPositions ) count += frequency;
        for ( int j = frequency; j-- != 0; ) {
          indexIterator.nextDocument();
          if ( index.hasPositions ) count += indexIterator.count();
        }
       
        if ( i == terms - 1 ) i++; // To fool the next
        if ( count >= blockSize && k < numberOfLocalIndices - 1 || i == terms ) {
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.