File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/api1 Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 4343import java .util .*;
4444import java .util .concurrent .TimeUnit ;
4545import java .util .stream .Collectors ;
46+ import java .util .stream .Stream ;
4647
4748/**
4849 * <p>See {@link PkgApi} for details on the methods this API affords.</p>
@@ -284,9 +285,13 @@ public SearchPkgsResult searchPkgs(final SearchPkgsRequest request) {
284285 if (
285286 null != request .expressionType
286287 && StringUtils .isNotBlank (request .expression )
287- && !StringUtils .containsIgnoreCase (
288- StringUtils .trimToEmpty (resolvedPkgVersionLocalization .getSummary ()),
289- StringUtils .trimToEmpty (request .expression ))) {
288+ && Stream .of (
289+ resolvedPkgVersionLocalization .getTitle (),
290+ resolvedPkgVersionLocalization .getSummary ())
291+ .noneMatch (s -> StringUtils .containsIgnoreCase (
292+ StringUtils .trimToEmpty (s ),
293+ StringUtils .trimToEmpty (request .expression )))
294+ ) {
290295 resultVersion .descriptionSnippet = StringHelper .tryCreateTextSnippetAroundFoundText (
291296 resolvedPkgVersionLocalization .getDescription (),
292297 request .expression ,
You can’t perform that action at this time.
0 commit comments