|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.search.CmsSearchParameters
public class CmsSearchParameters
Contains the search parameters for a call to .CmsSearchIndex.search(org.opencms.file.CmsObject, CmsSearchParameters, int, int)
| Constructor Summary | |
|---|---|
CmsSearchParameters(String query,
List fields,
List roots,
List categories,
boolean calculateCategories,
Sort sort)
Creates a new search parameter instance with the provided parameter values. |
|
| Method Summary | |
|---|---|
List |
getCategories()
Returns the list of categories to limit the search to. |
List |
getFields()
Returns the list of search index fields to search in. |
String |
getQuery()
Returns the search query to use. |
List |
getRoots()
Returns the search roots to use. |
Sort |
getSort()
Returns the sort order for the search. |
boolean |
isCalculateCategories()
Returns true if the category count is calculated for all search results. |
CmsSearchParameters |
restrict(CmsSearchParameters restriction)
Creates a merged parameter set from this parameters, restricted by the given other parameters. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CmsSearchParameters(String query,
List fields,
List roots,
List categories,
boolean calculateCategories,
Sort sort)
query - the search term to search the indexfields - the list of fields to searchroots - only resource that are sub-resource of one of the search roots are included in the search resultcategories - the list of categories to limit the search tocalculateCategories - if true, the category count is calculated for all search results
(use with caution, this option uses much performance)sort - the sort order for the search| Method Detail |
|---|
public List getCategories()
public List getFields()
public String getQuery()
public List getRoots()
Only resource that are sub-resource of one of the search roots are included in the search result.
public Sort getSort()
public boolean isCalculateCategories()
true if the category count is calculated for all search results.
true if the category count is calculated for all search resultspublic CmsSearchParameters restrict(CmsSearchParameters restriction)
This is mainly intended for "search in search result" functions.
The restricted query is build of the queries of both parameters, appended with AND.
The lists in the restriction for , getFields() and
getRoots() are intersected with the lists of this search parameters. Only
elements containd in both lists are included for the created search parameters.
If a list in either the restriction or in this search parameters is getCategories()null,
the list from the other search parameters is used direclty.
The values for
and isCalculateCategories() of this parameters are used for the restricted parameters.getSort()
restriction - the parameters to restrict this parameters with
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||