public IteratorSearchResponse searchQueryIterator(Query query, String repositoryId, Integer from, Integer count, Integer hitLimit, boolean uniqueRGA, List<ArtifactInfoFilter> filters) throws NoSuchRepositoryException { IteratorSearchRequest req = createRequest(query, from, count, hitLimit, uniqueRGA, filters); return searchIterator(repositoryId, req); }
public IteratorSearchResponse searchArtifactClassIterator(String term, String repositoryId, Integer from, Integer count, Integer hitLimit, SearchType searchType, List<ArtifactInfoFilter> filters) throws NoSuchRepositoryException { if (term.endsWith(".class")) { term = term.substring(0, term.length() - 6); } Query q = constructQuery(MAVEN.CLASSNAMES, term, searchType); IteratorSearchRequest req = createRequest(q, from, count, hitLimit, false, filters); req.getMatchHighlightRequests().add(new MatchHighlightRequest(MAVEN.CLASSNAMES, q, MatchHighlightMode.HTML)); return searchIterator(repositoryId, req); }
public IteratorSearchResponse searchArtifactSha1ChecksumIterator(String sha1Checksum, String repositoryId, Integer from, Integer count, Integer hitLimit, List<ArtifactInfoFilter> filters) throws NoSuchRepositoryException { if (sha1Checksum == null || sha1Checksum.length() > 40) { return IteratorSearchResponse.TOO_MANY_HITS_ITERATOR_SEARCH_RESPONSE; } SearchType searchType = sha1Checksum.length() == 40 ? SearchType.EXACT : SearchType.SCORED; BooleanQuery bq = new BooleanQuery(); if (sha1Checksum != null) { bq.add(constructQuery(MAVEN.SHA1, sha1Checksum, searchType), BooleanClause.Occur.MUST); } IteratorSearchRequest req = createRequest(bq, from, count, hitLimit, false, filters); return searchIterator(repositoryId, req); }
req.getMatchHighlightRequests().add(new MatchHighlightRequest(MAVEN.ARTIFACT_ID, q2, MatchHighlightMode.HTML)); return searchIterator(repositoryId, req);
return searchIterator(repositoryId, req);