class SearchResource extends AlpineResource {

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response aggregateSearch(@QueryParam("query") String query) {<FILL_FUNCTION_BODY>}

    @Path("/project")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response projectSearch(@QueryParam("query") String query) {
        final SearchManager searchManager = new SearchManager();
        final SearchResult searchResult = searchManager.searchProjectIndex(query, 1000);
        return Response.ok(searchResult).build();
    }

    @Path("/component")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response componentSearch(@QueryParam("query") String query) {
        final SearchManager searchManager = new SearchManager();
        final SearchResult searchResult = searchManager.searchComponentIndex(query, 1000);
        return Response.ok(searchResult).build();
    }

    @Path("/service")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response serviceSearch(@QueryParam("query") String query) {
        final SearchManager searchManager = new SearchManager();
        final SearchResult searchResult = searchManager.searchServiceComponentIndex(query, 1000);
        return Response.ok(searchResult).build();
    }

    @Path("/license")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response licenseSearch(@QueryParam("query") String query) {
        final SearchManager searchManager = new SearchManager();
        final SearchResult searchResult = searchManager.searchLicenseIndex(query, 1000);
        return Response.ok(searchResult).build();
    }

    @Path("/vulnerability")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response vulnerabilitySearch(@QueryParam("query") String query) {
        final SearchManager searchManager = new SearchManager();
        final SearchResult searchResult = searchManager.searchVulnerabilityIndex(query, 1000);
        return Response.ok(searchResult).build();
    }

    @Path("/vulnerablesoftware")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Processes and returns search results",
            response = SearchResult.class,
            notes = "<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    @PermissionRequired(Permissions.Constants.VIEW_PORTFOLIO)
    public Response vulnerableSoftwareSearch(@QueryParam("query") String query, @QueryParam("cpe") String cpe) {
        if (StringUtils.isNotBlank(cpe)) {
            final FuzzyVulnerableSoftwareSearchManager searchManager = new FuzzyVulnerableSoftwareSearchManager(false);
            final SearchResult searchResult = searchManager.searchIndex(FuzzyVulnerableSoftwareSearchManager.getLuceneCpeRegexp(cpe));
            return Response.ok(searchResult).build();
        } else {
            final SearchManager searchManager = new SearchManager();
            final SearchResult searchResult = searchManager.searchVulnerableSoftwareIndex(query, 1000);
            return Response.ok(searchResult).build();
        }
    }

    @Path("/reindex")
    @POST
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Rebuild lucene indexes for search operations",
            notes = "<p>Requires permission <strong>SYSTEM_CONFIGURATION</strong></p>"
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized"),
            @ApiResponse(code = 400, message = "No valid index type was provided")
    })
    @PermissionRequired(Permissions.Constants.SYSTEM_CONFIGURATION)
    public Response reindex(@QueryParam("type") Set<String> type) {
        if (type == null || type.isEmpty()) {
            return Response.status(Response.Status.BAD_REQUEST).entity("No valid index type was provided").build();
        }
        try {
            final SearchManager searchManager = new SearchManager();
            String chainIdentifier = searchManager.reindex(type);
            return Response.ok(Collections.singletonMap("token", chainIdentifier)).build();
        } catch (IllegalArgumentException exception) {
            return Response.status(Response.Status.BAD_REQUEST).entity(exception.getMessage()).build();
        }
    }
}

        final SearchManager searchManager = new SearchManager();
        final SearchResult searchResult = searchManager.searchIndices(query, 1000);
        return Response.ok(searchResult).build();
    
<no_super_class>