Examples of nextDocument()


Examples of it.unimi.dsi.mg4j.search.NotDocumentIterator.nextDocument()

   
    NotDocumentIterator notDocumentIterator = NotDocumentIterator.getInstance( i, 8 );
    assertEquals( 0, notDocumentIterator.nextDocument() );
    assertEquals( 0, notDocumentIterator.document() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 1, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 3, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 5, notDocumentIterator.nextDocument() );
    assertEquals( 5, notDocumentIterator.document() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.NotDocumentIterator.nextDocument()

    assertEquals( 0, notDocumentIterator.nextDocument() );
    assertEquals( 0, notDocumentIterator.document() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 1, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 3, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 5, notDocumentIterator.nextDocument() );
    assertEquals( 5, notDocumentIterator.document() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 6, notDocumentIterator.nextDocument() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.NotDocumentIterator.nextDocument()

    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 1, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 3, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 5, notDocumentIterator.nextDocument() );
    assertEquals( 5, notDocumentIterator.document() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 6, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertFalse( notDocumentIterator.hasNext() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.NotDocumentIterator.nextDocument()

    assertEquals( 3, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 5, notDocumentIterator.nextDocument() );
    assertEquals( 5, notDocumentIterator.document() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertEquals( 6, notDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, notDocumentIterator.intervalIterator() );
    assertFalse( notDocumentIterator.hasNext() );
    notDocumentIterator.dispose();
  }
 
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.OrDocumentIterator.nextDocument()

        } );
    OrDocumentIterator orDocumentIterator = (OrDocumentIterator)OrDocumentIterator.getInstance( i0, i1 );
    assertTrue( orDocumentIterator.hasNext() );
    assertTrue( orDocumentIterator.hasNext() ); // To increase coverage
   
    assertEquals( 0, orDocumentIterator.nextDocument() );
    assertTrue( orDocumentIterator.intervalIterator().hasNext() );
    assertTrue( orDocumentIterator.intervalIterator().hasNext() ); // To increase coverage
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() ); // To increase coverage
View Full Code Here

Examples of org.infinispan.schematic.document.DocumentSequence.nextDocument()

    public void shouldParseMultipleDocuments() throws Exception {
        InputStream stream = getClass().getClassLoader().getResourceAsStream("json/multiple-json-files.txt");
        DocumentSequence seq = reader.readMultiple(stream);
        int count = 0;
        while (true) {
            Document doc = seq.nextDocument();
            if (doc == null) break;
            ++count;
        }
        assertThat(count, is(265));
    }
View Full Code Here

Examples of org.sindice.siren.index.codecs.siren10.DocsFreqBlockIndexInput.DocsFreqBlockReader.nextDocument()

    reader.setPosBlockIndex(in.index());
    for (int i = 0; i < 11777; i++) {
      if (reader.isExhausted()) {
        reader.nextBlock();
      }
      assertEquals(i, reader.nextDocument());
    }

    in.close();
  }
View Full Code Here

Examples of org.sindice.siren.index.codecs.siren10.Siren10PostingsReader.Siren10DocsNodesAndPositionsEnum.nextDocument()

    final DocsEnum docsEnum = aReader.termDocsEnum(new Term(DEFAULT_TEST_FIELD, "aaa"));
    assertTrue(docsEnum instanceof Siren10DocsEnum);
    final Siren10DocsNodesAndPositionsEnum e = ((Siren10DocsEnum) docsEnum).getDocsNodesAndPositionsEnum();
    assertEquals(-1, e.doc());
    assertEquals(0, e.nodeFreqInDoc());
    assertTrue(e.nextDocument());
    assertEquals(0, e.doc());
    assertEquals(2, e.nodeFreqInDoc());
    assertTrue(e.nextDocument());
    assertEquals(1, e.doc());
    assertEquals(1, e.nodeFreqInDoc());
View Full Code Here

Examples of org.terrier.indexing.TRECFullTokenizer.nextDocument()

              query.append(token);
              query.append(' ');
             
            }
          }
          queryTokenizer.nextDocument();
          if (query.length() == 0)
            continue;
          vecStringQueries.add(query.toString().trim());
          vecStringIds.add(docnoToken.trim());
         
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.