public class ContentSearcherFactory.SearchModelContentSearcher extends Object
SearchModel.| Modifier and Type | Field and Description |
|---|---|
private boolean |
_checkRights |
private int |
_maxResults |
private String |
_searchMode |
private SearchUIModel |
_searchModel |
private List<Sort> |
_sort |
private int |
_start |
| Constructor and Description |
|---|
SearchModelContentSearcher(SearchModel searchModel)
Build a ContentSearcher referencing a
SearchModel. |
| Modifier and Type | Method and Description |
|---|---|
private SearcherFactory.Searcher |
_searcher(Map<String,Object> values,
Map<String,List<String>> facetValues,
Map<String,Object> contextualParameters) |
ContentSearcherFactory.SearchModelContentSearcher |
addSort(String fieldRef,
Sort.Order order)
Add a sort criterion.
|
protected List<SearchField> |
getFacets(Map<String,Object> contextualParameters)
Get the facet fields.
|
protected List<Sort> |
getSort(Map<String,Object> contextualParameters)
Get the sort criteria.
|
<C extends Content> |
search(Map<String,Object> values)
Search the contents.
|
<C extends Content> |
searchWithFacets(Map<String,Object> values)
Search the contents.
|
<C extends Content> |
searchWithFacets(Map<String,Object> values,
Map<String,List<String>> facetValues,
Map<String,Object> contextualParameters)
Search the contents.
|
<C extends Content> |
searchWithFacets(Map<String,Object> values,
Map<String,Object> contextualParameters)
Search the contents.
|
ContentSearcherFactory.SearchModelContentSearcher |
setCheckRights(boolean checkRights)
Whether to check rights when searching, false otherwise.
|
ContentSearcherFactory.SearchModelContentSearcher |
withLimits(int start,
int maxResults)
Set the limits to use.
|
ContentSearcherFactory.SearchModelContentSearcher |
withSearchMode(String searchMode)
Set the search mode.
|
ContentSearcherFactory.SearchModelContentSearcher |
withSort(List<Sort> sortCriteria)
Set the sort criteria.
|
private SearchUIModel _searchModel
private String _searchMode
private int _start
private int _maxResults
private boolean _checkRights
public SearchModelContentSearcher(SearchModel searchModel)
SearchModel.searchModel - the SearchModel.public ContentSearcherFactory.SearchModelContentSearcher addSort(String fieldRef, Sort.Order order)
fieldRef - The field reference (name of a SearchField).order - The sort order.public ContentSearcherFactory.SearchModelContentSearcher withSort(List<Sort> sortCriteria)
sortCriteria - The sort criteria as a List.public ContentSearcherFactory.SearchModelContentSearcher withSearchMode(String searchMode)
searchMode - The search mode.public ContentSearcherFactory.SearchModelContentSearcher withLimits(int start, int maxResults)
start - The start index.maxResults - The maximum number of results.public ContentSearcherFactory.SearchModelContentSearcher setCheckRights(boolean checkRights)
checkRights - true to check rights, false otherwise.public <C extends Content> AmetysObjectIterable<C> search(Map<String,Object> values) throws Exception
C - The type Contentvalues - The values for search criteria defined in the model.AmetysObjects.Exception - if an error occurs.public <C extends Content> SearchResults<C> searchWithFacets(Map<String,Object> values) throws Exception
C - The type Content *values - The values for search criteria defined in the model.Exception - if an error occurs.public <C extends Content> SearchResults<C> searchWithFacets(Map<String,Object> values, Map<String,Object> contextualParameters) throws Exception
C - The type Contentvalues - The values for search criteria defined in the model.contextualParameters - The search contextual parameters.Exception - if an error occurs.public <C extends Content> SearchResults<C> searchWithFacets(Map<String,Object> values, Map<String,List<String>> facetValues, Map<String,Object> contextualParameters) throws Exception
C - The type Contentvalues - The values for search criteria defined in the model.facetValues - The facet values, indexedcontextualParameters - The search contextual parameters.Exception - if an error occurs.private SearcherFactory.Searcher _searcher(Map<String,Object> values, Map<String,List<String>> facetValues, Map<String,Object> contextualParameters)
protected List<Sort> getSort(Map<String,Object> contextualParameters)
contextualParameters - The search contextual parameters.