Package org.opencms.jsp.search.result
Class CmsSearchResultWrapper
java.lang.Object
org.opencms.jsp.search.result.CmsSearchResultWrapper
- All Implemented Interfaces:
I_CmsSearchResultWrapper
Wrapper for the whole search result. Also allowing to access the search form controller.
-
Constructor Summary
ConstructorsConstructorDescriptionCmsSearchResultWrapper(I_CmsSearchControllerMain controller, CmsSolrResultList resultList, CmsSolrQuery query, CmsObject cms, CmsSearchException exception) Constructor taking the main search form controller and the result list as normally returned. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconvertSearchResults(Collection<CmsSearchResource> searchResults) Converts the search results from CmsSearchResource to CmsSearchResourceBean.Returns the main controller for the search form.Returns the "Did you mean ...?" suggestion - if did you mean is enabled.org.apache.solr.client.solrj.response.SpellCheckResponse.SuggestionReturns the suggestion of "Did you mean ...?" for the complete query - if did you mean is enabled.Returns the empty search state parameters.intgetEnd()Returns the last index of the documents displayed.Returns the search exception if search fails.Returns the result of the query facet, i.e., the map from queries to the number of hits.Returns the map for field facet names to the search result part for that field facet.Collection<org.apache.solr.client.solrj.response.FacetField> Returns the collection of the search result parts for the field facets.Returns the query object as send to Solr.Returns the map from the document ids to the corresponding highlighting results (as map from the highlighted field to the highlighted snippets).Returns the maximal score of the found documents.Returns for the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).Returns the selected facet entries that are not part of the returned facet entries are provided (value).Returns for the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).longReturns the number of resources that where found.longReturns the number of maximally returned results, this is the minimum of the number of found resultsI_CmsSearchResultWrapper.getNumFound()and the number of results maximally processedI_CmsSearchConfigurationCommon.getMaxReturnedResults()intReturns the number of pages necessary to show all search results.intReturns the number of the fist page that should be shown in a "Google"-like page navigation.intReturns the number of the last page that should be shown in a "Google"-like page navigation.Returns the map for range facet names to the search result part for that range facet.Collection<org.apache.solr.client.solrj.response.RangeFacet> Returns the collection of the search result parts for the range facets.Returns the collection of the search results that are returned by Solr.getStart()Returns the index (starting at 1) of the first result that is returned for displaying.Returns the current search state parameters.
-
Constructor Details
-
CmsSearchResultWrapper
public CmsSearchResultWrapper(I_CmsSearchControllerMain controller, CmsSolrResultList resultList, CmsSolrQuery query, CmsObject cms, CmsSearchException exception) Constructor taking the main search form controller and the result list as normally returned.- Parameters:
controller- The main search form controller.resultList- The result list as returned from OpenCms' embedded Solr server.query- The complete query send to Solr.cms- The Cms object used to access XML contents, if wanted.exception- Search exception, ornullif no exception occurs.
-
-
Method Details
-
getController
Description copied from interface:I_CmsSearchResultWrapperReturns the main controller for the search form.- Specified by:
getControllerin interfaceI_CmsSearchResultWrapper- Returns:
- The main controller for the search form.
- See Also:
-
getDidYouMeanCollated
Description copied from interface:I_CmsSearchResultWrapperReturns the "Did you mean ...?" suggestion - if did you mean is enabled.- Specified by:
getDidYouMeanCollatedin interfaceI_CmsSearchResultWrapper- Returns:
- The "Did you mean ...?" suggestion - if did you mean is enabled.
- See Also:
-
getDidYouMeanSuggestion
public org.apache.solr.client.solrj.response.SpellCheckResponse.Suggestion getDidYouMeanSuggestion()Description copied from interface:I_CmsSearchResultWrapperReturns the suggestion of "Did you mean ...?" for the complete query - if did you mean is enabled.- Specified by:
getDidYouMeanSuggestionin interfaceI_CmsSearchResultWrapper- Returns:
- The suggestion of "Did you mean ...?" for the complete query - if did you mean is enabled.
- See Also:
-
getEmptyStateParameters
Description copied from interface:I_CmsSearchResultWrapperReturns the empty search state parameters. Use the function to generate just part of the state parameters, instead of manipulating the current state.- Specified by:
getEmptyStateParametersin interfaceI_CmsSearchResultWrapper- Returns:
- The empty search state parameters.
- See Also:
-
getEnd
Description copied from interface:I_CmsSearchResultWrapperReturns the last index of the documents displayed.- Specified by:
getEndin interfaceI_CmsSearchResultWrapper- Returns:
- The last index of the documents displayed.
- See Also:
-
getException
Description copied from interface:I_CmsSearchResultWrapperReturns the search exception if search fails.- Specified by:
getExceptionin interfaceI_CmsSearchResultWrapper- Returns:
- The exception thrown by Solr, or
nullif the search succeeds. - See Also:
-
getFacetQuery
Description copied from interface:I_CmsSearchResultWrapperReturns the result of the query facet, i.e., the map from queries to the number of hits.- Specified by:
getFacetQueryin interfaceI_CmsSearchResultWrapper- Returns:
- The result of the query facet, i.e., the map from queries to the number of hits.
- See Also:
-
getFieldFacet
Description copied from interface:I_CmsSearchResultWrapperReturns the map for field facet names to the search result part for that field facet.- Specified by:
getFieldFacetin interfaceI_CmsSearchResultWrapper- Returns:
- The map for field facet names to the search result part for that field facet.
- See Also:
-
getFieldFacets
Description copied from interface:I_CmsSearchResultWrapperReturns the collection of the search result parts for the field facets.- Specified by:
getFieldFacetsin interfaceI_CmsSearchResultWrapper- Returns:
- The collection of the search result parts for the field facets.
- See Also:
-
getFinalQuery
Description copied from interface:I_CmsSearchResultWrapperReturns the query object as send to Solr.- Specified by:
getFinalQueryin interfaceI_CmsSearchResultWrapper- Returns:
- The query object as send to Solr.
- See Also:
-
getHighlighting
Description copied from interface:I_CmsSearchResultWrapperReturns the map from the document ids to the corresponding highlighting results (as map from the highlighted field to the highlighted snippets).- Specified by:
getHighlightingin interfaceI_CmsSearchResultWrapper- Returns:
- The map from the document ids to the corresponding highlighting results (as map from the highlighted field to the highlighted snippets).
- See Also:
-
getMaxScore
Description copied from interface:I_CmsSearchResultWrapperReturns the maximal score of the found documents.- Specified by:
getMaxScorein interfaceI_CmsSearchResultWrapper- Returns:
- The maximal score of the found documents.
- See Also:
-
getMissingSelectedFieldFacetEntries
Description copied from interface:I_CmsSearchResultWrapperReturns for the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).- Specified by:
getMissingSelectedFieldFacetEntriesin interfaceI_CmsSearchResultWrapper- Returns:
- For the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).
- See Also:
-
getMissingSelectedQueryFacetEntries
Description copied from interface:I_CmsSearchResultWrapperReturns the selected facet entries that are not part of the returned facet entries are provided (value).- Specified by:
getMissingSelectedQueryFacetEntriesin interfaceI_CmsSearchResultWrapper- Returns:
- The selected facet entries that are not part of the returned facet entries are provided (value).
- See Also:
-
getMissingSelectedRangeFacetEntries
Description copied from interface:I_CmsSearchResultWrapperReturns for the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).- Specified by:
getMissingSelectedRangeFacetEntriesin interfaceI_CmsSearchResultWrapper- Returns:
- For the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).
- See Also:
-
getNumFound
Description copied from interface:I_CmsSearchResultWrapperReturns the number of resources that where found.- Specified by:
getNumFoundin interfaceI_CmsSearchResultWrapper- Returns:
- The number of resources that where found.
- See Also:
-
getNumMaxReturned
Description copied from interface:I_CmsSearchResultWrapperReturns the number of maximally returned results, this is the minimum of the number of found resultsI_CmsSearchResultWrapper.getNumFound()and the number of results maximally processedI_CmsSearchConfigurationCommon.getMaxReturnedResults()- Specified by:
getNumMaxReturnedin interfaceI_CmsSearchResultWrapper- Returns:
- the number of maximally returned results.
- See Also:
-
getNumPages
Description copied from interface:I_CmsSearchResultWrapperReturns the number of pages necessary to show all search results.- Specified by:
getNumPagesin interfaceI_CmsSearchResultWrapper- Returns:
- The number of pages necessary to show all search results.
- See Also:
-
getRangeFacet
Description copied from interface:I_CmsSearchResultWrapperReturns the map for range facet names to the search result part for that range facet.- Specified by:
getRangeFacetin interfaceI_CmsSearchResultWrapper- Returns:
- The map for range facet names to the search result part for that range facet.
- See Also:
-
getRangeFacets
Description copied from interface:I_CmsSearchResultWrapperReturns the collection of the search result parts for the range facets.- Specified by:
getRangeFacetsin interfaceI_CmsSearchResultWrapper- Returns:
- The collection of the search result parts for the range facets.
- See Also:
-
getSearchResults
Description copied from interface:I_CmsSearchResultWrapperReturns the collection of the search results that are returned by Solr.- Specified by:
getSearchResultsin interfaceI_CmsSearchResultWrapper- Returns:
- The collection of the search results that are returned by Solr.
- See Also:
-
getStart
Description copied from interface:I_CmsSearchResultWrapperReturns the index (starting at 1) of the first result that is returned for displaying.- Specified by:
getStartin interfaceI_CmsSearchResultWrapper- Returns:
- The index (starting at 1) of the first result that is returned for displaying.
- See Also:
-
getStateParameters
Description copied from interface:I_CmsSearchResultWrapperReturns the current search state parameters.- Specified by:
getStateParametersin interfaceI_CmsSearchResultWrapper- Returns:
- The current search state parameters.
- See Also:
-
convertSearchResults
Converts the search results from CmsSearchResource to CmsSearchResourceBean.- Parameters:
searchResults- The collection of search results to transform.
-