Package org.ctan.site.resources
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 Summary
ConstructorsConstructorDescriptionSearch3Resource
(@NonNull SearchService service) This is the constructor for the classContent3Resource
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodgetHits
provides means to retrieve search results.The methodsearchVersion
provides means to retrieve the current version number.
-
Constructor Details
-
Search3Resource
This is the constructor for the classContent3Resource
.- 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 methodgetHits
provides means to retrieve search results.- Parameters:
phrase
- the query stringpage
- the current page; it is 0-basedsize
- the page size or 16lang
- the ISO language codesections
- the section to include in the search as single letter string- Returns:
- the list of hits
-
searchVersion
The methodsearchVersion
provides means to retrieve the current version number.- Returns:
- the version number as string
-