pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

Class SearchSite

  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.core.site.search.SearchSite

public class SearchSite
extends Controller

a simple controller to use the site-wide full-text search.

It also provides a Result to initialise the advance search, i.e. restricting a search to certain SitemapSectionTags.

It records successful searches (as SearchSuggestion) and fruitless searches (as SearchFailure). The SearchSuggestions can be used for an auto-completion search with the SearchSiteSuggestions controller.

The SearchSiteJoblet can be configured to remove stale suggestions and failures.

The actual search query is expected to be the first value of the Parameter search. A limitation to SitemapNodes belonging to specific SitemapSectionTags can be provided in the Parameter sectionTag with the SitemapSectionTag.id as the value.

$Revision: 1832 $
Thomas Weber
See Also:
SearchSiteConfiguration, SearchSuggestion, SearchFailure, SearchSiteSuggestions, SearchSiteJoblet, SitemapSectionTag

Nested Class Summary
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Constructor Summary
Method Summary
 AdvancedSearchResult initAdvancedSearch(Bundle bundle, ServiceRequest request)
          initialises the advanced search view.
 SearchSiteResult searchSite(Bundle bundle, ServiceRequest request)
          delegates the search request to the corresponding worker methods.
protected  void searchSitemap(Bundle bundle, ServiceRequest request, SearchSiteResult result, java.lang.String search, org.hibernate.search.FullTextSession session)
          performs a search on the complete sitemap.
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SearchSite()
Method Detail


@Action(value="searchSite", generate=true, stripSitemapID=false)
public SearchSiteResult searchSite(Bundle bundle, ServiceRequest request)
delegates the search request to the corresponding worker methods.

request - the ServiceRequest as a basic context for the Controller
bundle - the bundle object
a Result reprensenting the Sitemap, its root SitemapNode and the children of the root SitemapNode, if present.


@Action(value="initAdvancedSearch", generate=true, stripSitemapID=false)
public AdvancedSearchResult initAdvancedSearch(Bundle bundle, ServiceRequest request)
initialises the advanced search view.

bundle - the bundle
request - the current request
the AdvancedSearchResult with all available tags


protected void searchSitemap(Bundle bundle, ServiceRequest request, SearchSiteResult result,
                             java.lang.String search,
                             org.hibernate.search.FullTextSession session)
                      throws org.apache.lucene.queryParser.ParseException
performs a search on the complete sitemap.

bundle - the current bundle for configuration access
request - the request
search - the search string
session - the full text session
result - the search result
org.apache.lucene.queryParser.ParseException - on errors parsing the search string