Class SolrSearchApp
java.lang.Object
fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
fr.paris.lutece.plugins.search.solr.web.SolrSearchApp
- All Implemented Interfaces:
fr.paris.lutece.portal.web.xpages.XPageApplication,Serializable
@RequestScoped
@Named("solr.xpage.search-solr")
@Controller(xpageName="search-solr")
public class SolrSearchApp
extends fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
This page shows some features of Solr like Highlights or Facets.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfr.paris.lutece.portal.web.xpages.XPagegetJsonResults(jakarta.servlet.http.HttpServletRequest request) Returns the raw Solr JSON response for the current query, restricted to the whitelisted parameters.fr.paris.lutece.portal.web.xpages.XPagegetSearchFragment(jakarta.servlet.http.HttpServletRequest request) Displays the search results as a standalone HTML fragment, without the portal header and footer.fr.paris.lutece.portal.web.xpages.XPagegetSearchPage(jakarta.servlet.http.HttpServletRequest request) Displays the full search results page, integrated in the portal skin.getSearchResultModel(jakarta.servlet.http.HttpServletRequest request, SolrSearchAppConf conf) Performs a search and fills the model (useful when a page needs to remind search parameters/results)fr.paris.lutece.portal.web.xpages.XPagegetSuggest(jakarta.servlet.http.HttpServletRequest request) Returns the autocomplete suggestions as JSON for the current terms, in the form{"response":{"docs":[{"title":"..."}]}}.Methods inherited from class fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
getPage, getRealClass
-
Field Details
-
PARAMETER_CONF
- See Also:
-
-
Constructor Details
-
SolrSearchApp
public SolrSearchApp()
-
-
Method Details
-
getSearchPage
@View(value="search", defaultView=true) public fr.paris.lutece.portal.web.xpages.XPage getSearchPage(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.message.SiteMessageException Displays the full search results page, integrated in the portal skin.- Parameters:
request- The HTTP request.- Returns:
- The full search results page.
- Throws:
fr.paris.lutece.portal.service.message.SiteMessageException- exception
-
getSearchFragment
@View("fragment") public fr.paris.lutece.portal.web.xpages.XPage getSearchFragment(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.message.SiteMessageException Displays the search results as a standalone HTML fragment, without the portal header and footer.- Parameters:
request- The HTTP request.- Returns:
- The standalone search results fragment.
- Throws:
fr.paris.lutece.portal.service.message.SiteMessageException- exception
-
getJsonResults
@View("json") public fr.paris.lutece.portal.web.xpages.XPage getJsonResults(jakarta.servlet.http.HttpServletRequest request) Returns the raw Solr JSON response for the current query, restricted to the whitelisted parameters.- Parameters:
request- The HTTP request.- Returns:
- The raw Solr JSON response.
-
getSuggest
@View("suggest") public fr.paris.lutece.portal.web.xpages.XPage getSuggest(jakarta.servlet.http.HttpServletRequest request) Returns the autocomplete suggestions as JSON for the current terms, in the form{"response":{"docs":[{"title":"..."}]}}.- Parameters:
request- The HTTP request.- Returns:
- The suggestions as a JSON response.
-
getSearchResultModel
public Map<String,Object> getSearchResultModel(jakarta.servlet.http.HttpServletRequest request, SolrSearchAppConf conf) throws fr.paris.lutece.portal.service.message.SiteMessageException Performs a search and fills the model (useful when a page needs to remind search parameters/results)- Parameters:
request- the requestconf- the configuration- Returns:
- the model
- Throws:
fr.paris.lutece.portal.service.message.SiteMessageException- if an error occurs
-