Package org.opencms.search
Class CmsSearchParameters.CmsSearchFieldQuery
java.lang.Object
org.opencms.search.CmsSearchParameters.CmsSearchFieldQuery
- Enclosing class:
- CmsSearchParameters
Describes a specific search field query.
- 
Constructor SummaryConstructorsConstructorDescriptionCmsSearchFieldQuery(String fieldName, String searchTerm, org.apache.lucene.search.BooleanClause.Occur fieldOccur) Creates a new search field query with just a single search term.CmsSearchFieldQuery(String fieldName, org.apache.lucene.search.BooleanClause.Occur fieldOccur, List<String> termList, org.apache.lucene.search.BooleanClause.Occur termOccur) Creates a new search field query with a variable length search term list.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the field name.org.apache.lucene.search.BooleanClause.OccurgetOccur()Returns the occur parameter for this field query.Deprecated.Returns the search term list.org.apache.lucene.search.BooleanClause.OccurReturns the occur parameter used for the search term combination of this field query.voidsetFieldName(String fieldName) Sets the name of the field to use this query for.voidsetOccur(org.apache.lucene.search.BooleanClause.Occur occur) Sets the occur parameter for this field query.voidsetSearchQuery(String searchQuery) Deprecated.usesetSearchTerms(List)insteadvoidsetSearchTerms(List<String> searchTerms) Sets the search terms.
- 
Constructor Details- 
CmsSearchFieldQuerypublic CmsSearchFieldQuery(String fieldName, org.apache.lucene.search.BooleanClause.Occur fieldOccur, List<String> termList, org.apache.lucene.search.BooleanClause.Occur termOccur) Creates a new search field query with a variable length search term list.- Parameters:
- fieldName- the field name
- fieldOccur- the occur parameter for this field
- termList- the search term list
- termOccur- the occur parameter used for the search term combination
 
- 
CmsSearchFieldQuerypublic CmsSearchFieldQuery(String fieldName, String searchTerm, org.apache.lucene.search.BooleanClause.Occur fieldOccur) Creates a new search field query with just a single search term.Please note: Since there is only one term, the ocucr parameter for the term combination is not required and set to null.- Parameters:
- fieldName- the field name
- searchTerm- the search term
- fieldOccur- the occur parameter for this field
 
 
- 
- 
Method Details- 
getFieldNameReturns the field name.- Returns:
- the field name
 
- 
getOccurReturns the occur parameter for this field query.- Returns:
- the occur parameter for this field query
 
- 
getSearchQueryDeprecated.usegetSearchTerms()insteadReturns the first entry from the term list.- Returns:
- the search query
 
- 
getSearchTermsReturns the search term list.- Returns:
- the search term list
 
- 
getTermOccurReturns the occur parameter used for the search term combination of this field query.- Returns:
- the occur parameter used for the search term combination of this field query
 
- 
setFieldNameSets the name of the field to use this query for.- Parameters:
- fieldName- the name of the field to use this query for
 
- 
setOccurSets the occur parameter for this field query.- Parameters:
- occur- the occur parameter to set
 
- 
setSearchQueryDeprecated.usesetSearchTerms(List)insteadSets the search keywords to just a single entry.- Parameters:
- searchQuery- the single search keyword to set
 
- 
setSearchTermsSets the search terms.- Parameters:
- searchTerms- the search terms to set
 
 
- 
getSearchTerms()instead