code: protected void doPostWithSearch(WebSiteRequest req, HttpServletResponse resp) throws ServletException, IOException, SQLException {
  		String query=req.getParameter("search_query");
  		String searchTarget=req.getParameter("search_target");
  		WebPageLayout layout=getWebPageLayout(req);
  		if(query!=null && searchTarget!=null) {
  			try (ChainWriter out = getHTMLChainWriter(req, resp)) {
  				layout.startHTML(this, req, resp, out, "document.forms['search_two'].search_query.select(); document.forms['search_two'].search_query.focus();");
  				boolean entire_site=searchTarget.equals("entire_site");
  				WebPage target = entire_site ? getRootPage() : this;
  
  				// If the target contains no pages, use its parent
  				if(target.getCachedPages(req).length==0) target=target.getParent();
  
  				// Get the list of words to search for
  				String[] words=StringUtility.splitString(query.replace('.', ' '));
  
  				List<SearchResult> results=new ArrayList<>();
  				if(words.length>0) {
  					// Perform the search
  					target.search(words, req, resp, results, new AoByteArrayOutputStream(), new SortedArrayList<>());
  					Collections.sort(results);
  					//StringUtility.sortObjectsAndFloatDescending(results, 1, 5);
  				}
  
  				layout.printSearchOutput(this, out, req, resp, query, entire_site, results, words);
  
  				layout.endHTML(this, req, resp, out);
  			}
  		} else {
  			doPost(req, resp);
  		}
  	}
docs: Handles any search posts, sends everything else on to <code>doPost(WebSiteRequest,HttpServletResponse)</code>.
  The search assumes the search parameters of <code>search_query</code> and <code>search_target</code>.  Both
  these values must be present for a search to be performed.  Search target may be either <code>"this_area"</code>
  or <code>"entire_site"</code>, defaulting to <code>"area"</code> for any other value.
  
  @see  #doPost(WebSiteRequest,HttpServletResponse)