Package org.apache.wiki.search
Class DefaultSearchManager.JSONSearch
java.lang.Object
org.apache.wiki.search.DefaultSearchManager.JSONSearch
- All Implemented Interfaces:
WikiAjaxServlet
- Enclosing class:
- DefaultSearchManager
Provides a JSON AJAX API to the JSPWiki Search Engine.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms a full search of pages.getSuggestions
(String wikiName, int maxLength) Provides a list of suggestions to use for a page name.void
-
Field Details
-
AJAX_ACTION_SUGGESTIONS
- See Also:
-
AJAX_ACTION_PAGES
- See Also:
-
DEFAULT_MAX_RESULTS
- See Also:
-
maxResults
-
-
Constructor Details
-
JSONSearch
public JSONSearch()
-
-
Method Details
-
getServletMapping
- Specified by:
getServletMapping
in interfaceWikiAjaxServlet
-
service
public void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String actionName, List<String> params) throws IOException - Specified by:
service
in interfaceWikiAjaxServlet
- Throws:
IOException
-
getSuggestions
Provides a list of suggestions to use for a page name. Currently, the algorithm just looks into the value parameter, and returns all page names from that.- Parameters:
wikiName
- the page namemaxLength
- maximum number of suggestions- Returns:
- the suggestions
-
findPages
Performs a full search of pages.- Parameters:
searchString
- The query stringmaxLength
- How many hits to return- Returns:
- the pages found
-