public static class CmsSearchParameters.CmsSearchFieldQuery extends java.lang.Object
Constructor and Description |
---|
CmsSearchFieldQuery(java.lang.String fieldName,
org.apache.lucene.search.BooleanClause.Occur fieldOccur,
java.util.List<java.lang.String> termList,
org.apache.lucene.search.BooleanClause.Occur termOccur)
Creates a new search field query with a variable length search term list.
|
CmsSearchFieldQuery(java.lang.String fieldName,
java.lang.String searchTerm,
org.apache.lucene.search.BooleanClause.Occur fieldOccur)
Creates a new search field query with just a single search term.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFieldName()
Returns the field name.
|
org.apache.lucene.search.BooleanClause.Occur |
getOccur()
Returns the occur parameter for this field query.
|
java.lang.String |
getSearchQuery()
Deprecated.
use
getSearchTerms() instead |
java.util.List<java.lang.String> |
getSearchTerms()
Returns the search term list.
|
org.apache.lucene.search.BooleanClause.Occur |
getTermOccur()
Returns the occur parameter used for the search term combination of this field query.
|
void |
setFieldName(java.lang.String fieldName)
Sets the name of the field to use this query for.
|
void |
setOccur(org.apache.lucene.search.BooleanClause.Occur occur)
Sets the occur parameter for this field query.
|
void |
setSearchQuery(java.lang.String searchQuery)
Deprecated.
use
setSearchTerms(List) instead |
void |
setSearchTerms(java.util.List<java.lang.String> searchTerms)
Sets the search terms.
|
public CmsSearchFieldQuery(java.lang.String fieldName, org.apache.lucene.search.BooleanClause.Occur fieldOccur, java.util.List<java.lang.String> termList, org.apache.lucene.search.BooleanClause.Occur termOccur)
fieldName
- the field namefieldOccur
- the occur parameter for this fieldtermList
- the search term listtermOccur
- the occur parameter used for the search term combinationpublic CmsSearchFieldQuery(java.lang.String fieldName, java.lang.String searchTerm, org.apache.lucene.search.BooleanClause.Occur fieldOccur)
Please note: Since there is only one term, the ocucr parameter for the term combination is
not required and set to null
.
fieldName
- the field namesearchTerm
- the search termfieldOccur
- the occur parameter for this fieldpublic java.lang.String getFieldName()
public org.apache.lucene.search.BooleanClause.Occur getOccur()
@Deprecated public java.lang.String getSearchQuery()
getSearchTerms()
insteadpublic java.util.List<java.lang.String> getSearchTerms()
public org.apache.lucene.search.BooleanClause.Occur getTermOccur()
public void setFieldName(java.lang.String fieldName)
fieldName
- the name of the field to use this query forpublic void setOccur(org.apache.lucene.search.BooleanClause.Occur occur)
occur
- the occur parameter to set@Deprecated public void setSearchQuery(java.lang.String searchQuery)
setSearchTerms(List)
insteadsearchQuery
- the single search keyword to setpublic void setSearchTerms(java.util.List<java.lang.String> searchTerms)
searchTerms
- the search terms to set