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 IteratorSearchResponse flatIteratorSearch(Map<String, String> terms, String repositoryId, Integer from, Integer count, Integer hitLimit, boolean uniqueRGA, SearchType searchType, List<ArtifactInfoFilter> filters) throws NoSuchRepositoryException { if (!canHandle(terms)) { return IteratorSearchResponse.empty(null); } return m_lucene.searchArtifactIterator(terms.get(TERM_KEYWORD), repositoryId, from, count, hitLimit, uniqueRGA, searchType, filters); }
public static final IteratorSearchResponse empty( final Query q ) { return new IteratorSearchResponse( q, 0, EMPTY_ITERATOR_RESULT_SET ); }
@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 ) result.close(); if ( result.getTotalHitsCount() > 0 ) result.close(); if ( result.getTotalHitsCount() > 0 ) result.close(); return IteratorSearchResponse.empty( result.getQuery() );
return IteratorSearchResponse.empty(req.getQuery()); Query query = result.getQuery(); int totalHints = result.getTotalHitsCount(); IteratorResultSet results = new LockingIteratorResultSet(result.getResults(), lockedContexts.lock); return new IteratorSearchResponse(query, totalHints, results); return IteratorSearchResponse.empty(req.getQuery());
artifacts.close();
expandPackaging, expandClassifier, collapseResults); result.setTooManyResults(searchResult.getTotalHitsCount() > countRequested); result.setTotalCount(searchResult.getTotalHitsCount()); result.setData(new ArrayList<NexusArtifact>(ai2NaColl(request, searchResult.getResults()))); if (collapseResults && result.getData().size() < searchResult.getTotalHitsCount() && result.getData().size() < COLLAPSE_OVERRIDE_TRESHOLD && searchResult.getTotalHitsCount() < HIT_LIMIT) { collapseResults = false; if (searchResult != null) { try { searchResult.close();
"Query terms \"" + terms + "\" (LQL \"" + iterator.getQuery() + "\") matched total of " + 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);
public IteratorResultSet iterator() { return getResults(); }
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) {
if ( result.getTotalHitsCount() > 0 ) result.close(); if ( result.getTotalHitsCount() > 0 ) result.close(); if ( result.getTotalHitsCount() > 0 ) result.close(); return IteratorSearchResponse.empty( result.getQuery() );
public IteratorResultSet iterator() { return getResults(); }
if ( result.getTotalHitsCount() > 0 ) result.close(); if ( result.getTotalHitsCount() > 0 ) result.close(); if ( result.getTotalHitsCount() > 0 ) result.close(); return IteratorSearchResponse.empty( result.getQuery() );
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 IteratorSearchResponse flatIteratorSearch(Map<String, String> terms, String repositoryId, Integer from, Integer count, Integer hitLimit, boolean uniqueRGA, SearchType searchType, List<ArtifactInfoFilter> filters) throws NoSuchRepositoryException { if (!canHandle(terms)) { return IteratorSearchResponse.empty(null); } return m_lucene.searchArtifactClassIterator(terms.get(TERM_CLASSNAME), repositoryId, from, count, hitLimit, searchType, filters); }
artifacts.close();
public IteratorResultSet iterator() { return getResults(); }
public static final IteratorSearchResponse empty( final Query q ) { return new IteratorSearchResponse( q, 0, EMPTY_ITERATOR_RESULT_SET ); }