@Test(expected = IllegalStateException.class) public void testIterableNoTermVectors() throws IOException { RAMDirectory directory = createTestIndex(TYPE_NO_TERM_VECTORS); IndexReader reader = DirectoryReader.open(directory); Weight weight = new TFIDF(); TermInfo termInfo = new CachedTermInfo(reader, "content", 1, 100); LuceneIterable iterable = new LuceneIterable(reader, "id", "content", termInfo,weight); Iterator<Vector> iterator = iterable.iterator(); Iterators.advance(iterator, 1); }
@Override public Iterator<Vector> iterator() { return new LuceneIterator(indexReader, idField, field, terminfo, weight, normPower, maxPercentErrorDocs); }
LuceneIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new LuceneIterator(indexReader, idField, field, terminfo, weight, normPower, maxPercentErrorDocs); } }
LuceneIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new LuceneIterator(indexReader, idField, field, terminfo, weight, normPower, maxPercentErrorDocs); } LuceneIterable(IndexReader reader, String idField, String field, TermInfo terminfo, Weight weight);  LuceneIterable(IndexReader indexReader, String idField, String field, TermInfo terminfo, Weight weight,
      double normPower);  LuceneIterable(IndexReader indexReader,
                        String idField,
                        String field,
                        TermInfo terminfo,
                        Weight weight,
                        double normPower,
                        double maxPercentErrorDocs); }
LuceneIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new LuceneIterator(indexReader, idField, field, terminfo, weight, normPower, maxPercentErrorDocs); } LuceneIterable(IndexReader reader, String idField, String field, TermInfo terminfo, Weight weight);  LuceneIterable(IndexReader indexReader, String idField, String field, TermInfo terminfo, Weight weight,
      double normPower);  LuceneIterable(IndexReader indexReader,
                        String idField,
                        String field,
                        TermInfo terminfo,
                        Weight weight,
                        double normPower,
                        double maxPercentErrorDocs); @Override Iterator<Vector> iterator(); }
LuceneIterable implements Iterable<Vector> { @Override public Iterator<Vector> iterator() { return new LuceneIterator(indexReader, idField, field, terminfo, weight, normPower, maxPercentErrorDocs); } LuceneIterable(IndexReader reader, String idField, String field, TermInfo terminfo, Weight weight);  LuceneIterable(IndexReader indexReader, String idField, String field, TermInfo terminfo, Weight weight,
      double normPower);  LuceneIterable(IndexReader indexReader,
                        String idField,
                        String field,
                        TermInfo terminfo,
                        Weight weight,
                        double normPower,
                        double maxPercentErrorDocs); @Override Iterator<Vector> iterator(); static final double NO_NORMALIZING; }