public Collection<ArtifactInfo> identify( Query query, Collection<IndexingContext> contexts ) throws IOException { final IteratorSearchResponse result = searcher.searchIteratorPaged( new IteratorSearchRequest( query ), contexts ); try { final ArrayList<ArtifactInfo> ais = new ArrayList<ArtifactInfo>( result.getTotalHitsCount() ); for ( ArtifactInfo ai : result ) { ais.add( ai ); } return ais; } finally { result.close(); } }
public Collection<ArtifactInfo> identify( Query query, Collection<IndexingContext> contexts ) throws IOException { final IteratorSearchResponse result = searcher.searchIteratorPaged( new IteratorSearchRequest( query ), contexts ); try { final ArrayList<ArtifactInfo> ais = new ArrayList<ArtifactInfo>( result.getTotalHitsCount() ); for ( ArtifactInfo ai : result ) { ais.add( ai ); } return ais; } finally { result.close(); } }
public Collection<ArtifactInfo> identify( Query query, Collection<IndexingContext> contexts ) throws IOException { final IteratorSearchResponse result = searcher.searchIteratorPaged( new IteratorSearchRequest( query ), contexts ); try { final ArrayList<ArtifactInfo> ais = new ArrayList<ArtifactInfo>( result.getTotalHitsCount() ); for ( ArtifactInfo ai : result ) { ais.add( ai ); } return ais; } finally { result.close(); } }
if ( result.getTotalHitsCount() > 0 ) if ( result.getTotalHitsCount() > 0 ) if ( result.getTotalHitsCount() > 0 )
@Override public void run(RepositoryInfo repo, IndexingContext context) throws IOException { IteratorSearchResponse response = repeatedPagedSearch(q, Collections.singletonList(context), MAX_RESULT_COUNT); if (response != null) { try { for (ArtifactInfo ai : response.iterator()) { infos.add(convertToNBVersionInfo(ai)); } } finally { Accessor.ACCESSOR.addReturnedResults(result, response.getTotalProcessedArtifactInfoCount()); Accessor.ACCESSOR.addTotalResults(result, response.getTotalHitsCount()); response.close(); } } } }, skipAction, skipUnIndexed);
if ( result.getTotalHitsCount() > 0 ) if ( result.getTotalHitsCount() > 0 ) if ( result.getTotalHitsCount() > 0 )
if ( result.getTotalHitsCount() > 0 ) if ( result.getTotalHitsCount() > 0 ) if ( result.getTotalHitsCount() > 0 )
int totalHints = result.getTotalHitsCount(); IteratorResultSet results = new LockingIteratorResultSet(result.getResults(), lockedContexts.lock);
searchResponse.setTotalCount(searchResult.getTotalHitsCount()); searchResponse.setFrom(from == null ? -1 : from.intValue()); searchResponse.setCount(count == LUCENE_HIT_LIMIT ? -1 : count);
if (collapseResults && searchResponse.getTotalHitsCount() < COLLAPSE_OVERRIDE_TRESHOLD) { searchResponse.close();
expandPackaging, expandClassifier, collapseResults); result.setTooManyResults(searchResult.getTotalHitsCount() > countRequested); result.setTotalCount(searchResult.getTotalHitsCount()); if (collapseResults && result.getData().size() < searchResult.getTotalHitsCount() && result.getData().size() < COLLAPSE_OVERRIDE_TRESHOLD && searchResult.getTotalHitsCount() < HIT_LIMIT) { collapseResults = false;
BooleanQuery.setMaxClauseCount(max); response = searcher.searchIteratorPaged(isr, contexts); LOGGER.log(Level.FINE, "passed on {0} clauses processing {1} with {2} hits", new Object[] {max, q, response.getTotalHitsCount()}); return response; } catch (BooleanQuery.TooManyClauses exc) {
+ iterator.getTotalHitsCount() + " records, " + iterator.getTotalProcessedArtifactInfoCount() + " records were processed out of those, resulting in " + gahits.size() + " unique GA records. Lucene scored documents first=" + firstDocumentScore + ", last=" response.setTooManyResults(tooManyResults || iterator.getTotalHitsCount() + 1 >= LUCENE_HIT_LIMIT); response.setCollapsed(!expand);