This method is equivalent to next(), but avoids the creation of an Integer Object. @see #next()
next()
275276277278279280281282283284285
} DocIterator iter = docs.iterator(); while (iter.hasNext()) { int docID = iter.nextDoc(); String raw = all.getTermText(docID); Double v = null; if( raw != null ) { v = Double.parseDouble( all.ft.indexedToReadable(raw) ); allstats.accumulate( v );
476477478479480481482483484485486
SolrIndexSearcher searcher = request.getSearcher(); DocIterator iterator = ids.iterator(); int sz = ids.size(); includeScore = includeScore && ids.hasScores(); for (int i=0; i<sz; i++) { int id = iterator.nextDoc(); Document doc = searcher.doc(id, fields); writeDoc(null, doc, fields, (includeScore ? iterator.score() : 0.0f), includeScore); } } }, fields );
140141142143144145146147148149150
// This is an iterator, but we only handle the first match DocIterator iterator = match.iterator(); if( iterator.hasNext() ) { // do a MoreLikeThis query for each document in results int id = iterator.nextDoc(); mltDocs = mlt.getMoreLikeThis( id, start, rows, filters, interesting, flags ); } } else { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,
321322323324325326327328329330331
{ IndexSchema schema = searcher.getSchema(); NamedList<DocList> mlt = new SimpleOrderedMap<DocList>(); DocIterator iterator = docs.iterator(); while( iterator.hasNext() ) { int id = iterator.nextDoc(); DocListAndSet sim = getMoreLikeThis( id, 0, rows, null, null, flags ); String name = schema.printableUniqueKey( reader.document( id ) ); mlt.add(name, sim.docList);
182183184185186187188189190191192
writeArrayOpener(sz); SolrIndexSearcher searcher = req.getSearcher(); DocIterator iterator = ids.iterator(); for (int i=0; i<sz; i++) { int id = iterator.nextDoc(); Document doc = searcher.doc(id, fields); writeKey(i, false); writeDoc(null, doc, fields, (includeScore ? iterator.score() : 0.0f), includeScore); } writeMapCloser();
116117118119120121122123124125126
codec.writeTag(JavaBinCodec.ARR, sz); if(searcher == null) searcher = solrQueryRequest.getSearcher(); if(schema == null) schema = solrQueryRequest.getSchema(); DocIterator iterator = ids.iterator(); for (int i = 0; i < sz; i++) { int id = iterator.nextDoc(); Document doc = searcher.doc(id, returnFields); SolrDocument sdoc = getDoc(doc); if (includeScore && ids.hasScores()) {
268269270271272273274275276277278
// Highlight each document DocIterator iterator = docs.iterator(); for (int i = 0; i < docs.size(); i++) { int docId = iterator.nextDoc(); Document doc = searcher.doc(docId, fset); NamedList docSummaries = new SimpleOrderedMap(); for (String fieldName : fieldNames) { fieldName = fieldName.trim(); String[] docTexts = doc.getValues(fieldName);
232233234235236237238239240241242
// Highlight each document DocIterator iterator = docs.iterator(); for (int i = 0; i < docs.size(); i++) { int docId = iterator.nextDoc(); Document doc = readDocs[i]; NamedList docSummaries = new NamedList(); for (String fieldName : fieldNames) { fieldName = fieldName.trim();
372373374375376377378379380381382
incLevel(); boolean first=true; DocIterator iterator = ids.iterator(); for (int i=0; i<sz; i++) { int id = iterator.nextDoc(); Document doc = searcher.doc(id, fields); if (first) { first=false; } else {
357358359360361362363364365366367
} incLevel(); DocIterator iterator = ids.iterator(); for (int i=0; i<sz; i++) { int id = iterator.nextDoc(); Document doc = searcher.doc(id, fields); writeDoc(null, doc, fields, (includeScore ? iterator.score() : 0.0f), includeScore); } decLevel();