public class CmsSearchResultWrapper extends java.lang.Object implements I_CmsSearchResultWrapper
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
convertSearchResults(java.util.Collection<CmsSearchResource> searchResults)
Converts the search results from CmsSearchResource to CmsSearchResourceBean.
|
I_CmsSearchControllerMain |
getController()
Returns the main controller for the search form.
|
java.lang.String |
getDidYouMeanCollated()
Returns the "Did you mean ...?"
|
org.apache.solr.client.solrj.response.SpellCheckResponse.Suggestion |
getDidYouMeanSuggestion()
Returns the suggestion of "Did you mean ...?"
|
I_CmsSearchStateParameters |
getEmptyStateParameters()
Returns the empty search state parameters.
|
int |
getEnd()
Returns the last index of the documents displayed.
|
CmsSearchException |
getException()
Returns the search exception if search fails.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getFacetQuery()
Returns the result of the query facet, i.e., the map from queries to the number of hits.
|
java.util.Map<java.lang.String,org.apache.solr.client.solrj.response.FacetField> |
getFieldFacet()
Returns the map for field facet names to the search result part for that field facet.
|
java.util.Collection<org.apache.solr.client.solrj.response.FacetField> |
getFieldFacets()
Returns the collection of the search result parts for the field facets.
|
CmsSolrQuery |
getFinalQuery()
Returns the query object as send to Solr.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String>>> |
getHighlighting()
Returns the map from the document ids to the corresponding highlighting results (as map from the highlighted field to the highlighted snippets).
|
java.lang.Float |
getMaxScore()
Returns the maximal score of the found documents.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getMissingSelectedFieldFacetEntries()
Returns for the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).
|
java.util.List<java.lang.String> |
getMissingSelectedQueryFacetEntries()
Returns the selected facet entries that are not part of the returned facet entries are provided (value).
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getMissingSelectedRangeFacetEntries()
Returns for the specified facet (key) the selected facet entries that are not part of the returned facet entries are provided (value).
|
long |
getNumFound()
Returns the number of resources that where found.
|
int |
getNumPages()
Returns the number of pages necessary to show all search results.
|
int |
getPageNavFirst()
Returns the number of the fist page that should be shown in a "Google"-like page navigation.
|
int |
getPageNavLast()
Returns the number of the last page that should be shown in a "Google"-like page navigation.
|
java.util.Map<java.lang.String,org.apache.solr.client.solrj.response.RangeFacet> |
getRangeFacet()
Returns the map for range facet names to the search result part for that range facet.
|
java.util.Collection<org.apache.solr.client.solrj.response.RangeFacet> |
getRangeFacets()
Returns the collection of the search result parts for the range facets.
|
java.util.Collection<I_CmsSearchResourceBean> |
getSearchResults()
Returns the collection of the search results that are returned by Solr.
|
java.lang.Long |
getStart()
Returns the index (starting at 1) of the first result that is returned for displaying.
|
CmsSearchStateParameters |
getStateParameters()
Returns the current search state parameters.
|
public CmsSearchResultWrapper(I_CmsSearchControllerMain controller, CmsSolrResultList resultList, CmsSolrQuery query, CmsObject cms, CmsSearchException exception)
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, or null if no exception occurs.public I_CmsSearchControllerMain getController()
I_CmsSearchResultWrappergetController in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getController()public java.lang.String getDidYouMeanCollated()
I_CmsSearchResultWrappergetDidYouMeanCollated in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getDidYouMeanCollated()public org.apache.solr.client.solrj.response.SpellCheckResponse.Suggestion getDidYouMeanSuggestion()
I_CmsSearchResultWrappergetDidYouMeanSuggestion in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getDidYouMeanSuggestion()public I_CmsSearchStateParameters getEmptyStateParameters()
I_CmsSearchResultWrappergetEmptyStateParameters in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getEmptyStateParameters()public int getEnd()
I_CmsSearchResultWrappergetEnd in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getEnd()public CmsSearchException getException()
I_CmsSearchResultWrappergetException in interface I_CmsSearchResultWrappernull if the search succeeds.I_CmsSearchResultWrapper.getException()public java.util.Map<java.lang.String,java.lang.Integer> getFacetQuery()
I_CmsSearchResultWrappergetFacetQuery in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getFacetQuery()public java.util.Map<java.lang.String,org.apache.solr.client.solrj.response.FacetField> getFieldFacet()
I_CmsSearchResultWrappergetFieldFacet in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getFieldFacet()public java.util.Collection<org.apache.solr.client.solrj.response.FacetField> getFieldFacets()
I_CmsSearchResultWrappergetFieldFacets in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getFieldFacets()public CmsSolrQuery getFinalQuery()
I_CmsSearchResultWrappergetFinalQuery in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getFinalQuery()public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getHighlighting()
I_CmsSearchResultWrappergetHighlighting in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getHighlighting()public java.lang.Float getMaxScore()
I_CmsSearchResultWrappergetMaxScore in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getMaxScore()public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMissingSelectedFieldFacetEntries()
I_CmsSearchResultWrappergetMissingSelectedFieldFacetEntries in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getMissingSelectedFieldFacetEntries()public java.util.List<java.lang.String> getMissingSelectedQueryFacetEntries()
I_CmsSearchResultWrappergetMissingSelectedQueryFacetEntries in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getMissingSelectedQueryFacetEntries()public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMissingSelectedRangeFacetEntries()
I_CmsSearchResultWrappergetMissingSelectedRangeFacetEntries in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getMissingSelectedRangeFacetEntries()public long getNumFound()
I_CmsSearchResultWrappergetNumFound in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getNumFound()public int getNumPages()
I_CmsSearchResultWrappergetNumPages in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getNumPages()public int getPageNavFirst()
I_CmsSearchResultWrappergetPageNavFirst in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getPageNavFirst()public int getPageNavLast()
I_CmsSearchResultWrappergetPageNavLast in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getPageNavLast()public java.util.Map<java.lang.String,org.apache.solr.client.solrj.response.RangeFacet> getRangeFacet()
I_CmsSearchResultWrappergetRangeFacet in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getRangeFacet()public java.util.Collection<org.apache.solr.client.solrj.response.RangeFacet> getRangeFacets()
I_CmsSearchResultWrappergetRangeFacets in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getRangeFacets()public java.util.Collection<I_CmsSearchResourceBean> getSearchResults()
I_CmsSearchResultWrappergetSearchResults in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getSearchResults()public java.lang.Long getStart()
I_CmsSearchResultWrappergetStart in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getStart()public CmsSearchStateParameters getStateParameters()
I_CmsSearchResultWrappergetStateParameters in interface I_CmsSearchResultWrapperI_CmsSearchResultWrapper.getStateParameters()protected void convertSearchResults(java.util.Collection<CmsSearchResource> searchResults)
searchResults - The collection of search results to transform.