Class Search3Resource

java.lang.Object
org.ctan.site.resources.Search3Resource

@Path("/3.0") @Produces({"application/json","application/xml"}) public class Search3Resource extends Object
The class Search3Resource contains the controller for the search resource.
  • Constructor Details

    • Search3Resource

      public Search3Resource(@NonNull @NonNull SearchService service)
      This is the constructor for the class Content3Resource.
      Parameters:
      service - the underlying service
  • Method Details

    • search

      @GET @Path("/search") public QueryContainer search(@QueryParam("for") String phrase, @QueryParam("page") @DefaultValue("0") int page, @QueryParam("size") @DefaultValue("16") int size, @QueryParam("lang") String lang, @QueryParam("in") String sections)
      The method getHits provides means to retrieve search results.
      Parameters:
      phrase - the query string
      page - the current page; it is 0-based
      size - the page size or 16
      lang - the ISO language code
      sections - the section to include in the search as single letter string
      Returns:
      the list of hits
    • searchVersion

      @GET @Path("search/version") @Produces("application/json") @PermitAll public String searchVersion()
      The method searchVersion provides means to retrieve the current version number.
      Returns:
      the version number as string