Class DefaultSearchManager.JSONSearch

    • Constructor Summary

      Constructors 
      Constructor Description
      JSONSearch()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> findPages​(java.lang.String searchString, int maxLength, Context wikiContext)
      Performs a full search of pages.
      java.lang.String getServletMapping()
      java.util.List<java.lang.String> getSuggestions​(java.lang.String wikiName, int maxLength)
      Provides a list of suggestions to use for a page name.
      void service​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String actionName, java.util.List<java.lang.String> params)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • service

        public void service​(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp,
                            java.lang.String actionName,
                            java.util.List<java.lang.String> params)
                     throws java.io.IOException
        Specified by:
        service in interface WikiAjaxServlet
        Throws:
        java.io.IOException
      • getSuggestions

        public java.util.List<java.lang.String> getSuggestions​(java.lang.String wikiName,
                                                               int maxLength)
        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 name
        maxLength - maximum number of suggestions
        Returns:
        the suggestions
      • findPages

        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> findPages​(java.lang.String searchString,
                                                                                                int maxLength,
                                                                                                Context wikiContext)
        Performs a full search of pages.
        Parameters:
        searchString - The query string
        maxLength - How many hits to return
        Returns:
        the pages found