Interface ISearchQuery
- All Known Implementing Classes:
BaseSearchQuery
,SerializableSearchQuery
,WmCommonSearch65xSearchQuery
public interface ISearchQuery
Interface that search query implementations must implement.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Reset the query state back to the original valuesMakes a clone of this search queryReturn the unique id of the search invocation, the search result portlet can use this id to determine if a new search has been executed.Deprecated.use @link #getKeywordTerms() or @link #getNormalizedKeywordTerms() insteadString[]
Gets the keywords field parsed into search terms.Get the maximum number of results allowed in the search resultsString[]
Gets the keyword fields parsed into search terms and normalized.Returns the map of refine field name/value pairs for the queryReturn true to use an 'or' query or false for an 'and' query.void
populateFromSearchStateString
(String stateString) Populate this object with data deserialized from the stateString.void
setInvocationID
(Integer invokeID) Setter for the invocation idtoSearchStateString
(ISearchStateOptions searchStateOptions) Serialize the search state to a string
-
Method Details
-
getInvocationID
Integer getInvocationID()Return the unique id of the search invocation, the search result portlet can use this id to determine if a new search has been executed. A new id is generated each time the user hits the 'Go' button in the searchbar control.- Returns:
- the id of the search invocation or zero if no search has been executed yet.
-
setInvocationID
Setter for the invocation id- Parameters:
invokeID
- the invocation id
-
getMaxResults
Integer getMaxResults()Get the maximum number of results allowed in the search results- Returns:
- max results number
-
getKeywordsField
String getKeywordsField()Deprecated.use @link #getKeywordTerms() or @link #getNormalizedKeywordTerms() insteadGets the raw value of the keywords field- Returns:
- the raw value of the keywords field
-
getKeywordTerms
String[] getKeywordTerms()Gets the keywords field parsed into search terms. NOTE: this API does not normalize the search terms.- Returns:
- the keyword terms for the query (not normalized)
-
getNormalizedKeywordTerms
String[] getNormalizedKeywordTerms()Gets the keyword fields parsed into search terms and normalized.- Returns:
- the normalized keyword terms for the query
-
getRefineFields
Returns the map of refine field name/value pairs for the query- Returns:
- map of refined field name/value pairs
-
getUseOrCondition
Boolean getUseOrCondition()Return true to use an 'or' query or false for an 'and' query.- Returns:
- true for 'or' query false otherwise
-
clear
void clear()Reset the query state back to the original values -
cloneSearchQuery
ISearchQuery cloneSearchQuery()Makes a clone of this search query -
toSearchStateString
Serialize the search state to a string- Parameters:
searchStateOptions
- the options to use when writing the search state- Returns:
- search state as a string
-
populateFromSearchStateString
Populate this object with data deserialized from the stateString.- Parameters:
stateString
- the search state string (from toSearchStateString method)
-