|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SearchQueryCriteria
Criteria for searching. Use the factory methods
jiveContext.getSearchQueryManager().createSearchQueryCriteria(xxx) to get a handle on a
SearchQueryCriteria object. From there you can define criteria to use for filtering and sorting
search query results that will be used by a SearchQuery.
SearchQueryManager,
SearchQuery| Nested Class Summary | |
|---|---|
static class |
SearchQueryCriteria.SortOrder
Represents the order in which search results will be returned |
| Method Summary | |
|---|---|
Date |
getAfterDate()
Returns the earliest date for search results. |
Date |
getBeforeDate()
Returns the latest date for search results. |
boolean |
getCollapseThreadMessages()
|
List<EntityDescriptor> |
getFilteredContainers()
Returns the containers that query results are restricted to. |
Map<IndexField,String> |
getFilteredFields()
Returns the fields that query results are restricted to. |
EntityDescriptor |
getFilteredObject()
Returns the container that query results are restricted to. |
Collection<TagSet> |
getFilteredTagSets()
Returns a collection of TagSets that query results are restricted to. |
User |
getFilteredUser()
Returns the user that query results are restricted to. |
int |
getMaxSearchResults()
|
String |
getQueryString()
Returns the search query string for the SearchQuery object. |
IndexField |
getSearchedField()
Returns the specific field which will be searched, if null all fields will be searched as is the default behavior. |
SearchQueryCriteria.SortOrder |
getSortOrder()
Returns the sort order, which will be SearchQueryCriteria.SortOrder.ASCENDING for ascending sorting, or
SearchQueryCriteria.SortOrder.DESCENDING for descending sorting. |
IndexField |
getSortType()
Returns the sort type to use to sort search results. |
boolean |
isBlogUniquelyNamed()
If a blog has a different name than its container, it is uniquely named. |
void |
setAfterDate(Date afterDate)
Sets the earliest date for search results. |
void |
setBeforeDate(Date beforeDate)
Sets the latest date for search results. |
void |
setBlogUniquelyNamed(boolean uniquelyNamed)
If a blog has a different name than its container, it is uniquely named. |
void |
setCollapseThreadMessages(boolean collapseThread)
|
void |
setFilterOnContainers(EntityDescriptor... containers)
Restricts the query results to content objects created inside a specific containers. |
void |
setFilterOnField(IndexField field,
String value)
Restricts the query results by the given field and value. |
void |
setFilterOnObject(EntityDescriptor jiveObject)
Restricts the query results to specific jiveobject. |
void |
setFilterOnTagSets(Collection<TagSet> tagSets)
Restricts the query results to content objects containing any one of the specified TagSets. |
void |
setFilterOnUser(User user)
Restricts the query results to content objects created by a specified user. |
void |
setMaxSearchResults(int maxSearchResults)
|
void |
setSearchedField(IndexField field)
Only a specific field will be searched when the searched field is specified. |
void |
setSortOrder(SearchQueryCriteria.SortOrder sortOrder)
Sets the sort type. |
void |
setSortType(IndexField field)
Sets the sort type to use to sort search results. |
| Method Detail |
|---|
String getQueryString()
Date getBeforeDate()
void setBeforeDate(Date beforeDate)
beforeDate - an upper date boundary for search results based upon modification datesDate getAfterDate()
void setAfterDate(Date afterDate)
afterDate - a lower date boundary for search results based upon modification datesUser getFilteredUser()
void setFilterOnUser(User user)
getUserMessages method
for a user's messages among all communities.
user - a User to restrict query results to.ThreadResultFilterList<EntityDescriptor> getFilteredContainers()
void setFilterOnContainers(EntityDescriptor... containers)
containers - a contianers to restrict query results to.EntityDescriptor getFilteredObject()
void setFilterOnObject(EntityDescriptor jiveObject)
jiveObject - a jiveObject to restrict query results to.
void setFilterOnField(IndexField field,
String value)
field - field to restrict the results by.value - value of the field to restrict the results by.Map<IndexField,String> getFilteredFields()
Collection<TagSet> getFilteredTagSets()
TagSets that query results are restricted to. If the query is
not restricted to content objects having a specific TagSet, this method will return null.
TagSets that the query results are restricted to, or null if
there is no tagset restrictionsvoid setFilterOnTagSets(Collection<TagSet> tagSets)
TagSets. Note: this method is not intended to show all content objects with a
particular tagset. Rather, it lets you filter out search results; for example, all blog posts
matching the query "Jive rocks", but filtering out all results that don't have the specified
TagSet.
tagSets - a collection of TagSets to restrict query results to.IndexField getSortType()
IndexField#relevance
void setSortType(IndexField field)
IndexField#relevance. This method
will also set the sort type for each specific search query criteria.
If the sort type does not match a specific search query criteria, the default value for the specific
search query criteria will be used.
field - the SortType that will be used for sorting.MessageSearchQueryCriteria,
BlogPostSearchQueryCriteria,
DocumentSearchQueryCriteriaSearchQueryCriteria.SortOrder getSortOrder()
SearchQueryCriteria.SortOrder.ASCENDING for ascending sorting, or
SearchQueryCriteria.SortOrder.DESCENDING for descending sorting. Descending sorting is: 3, 2, 1, etc.
Ascending sorting is 1, 2, 3, etc.
void setSortOrder(SearchQueryCriteria.SortOrder sortOrder)
SearchQueryCriteria.SortOrder.ASCENDING for ascending sorting or
SearchQueryCriteria.SortOrder.DESCENDING for descending sorting. Descending sorting is: 3, 2, 1, etc.
Ascending sorting is 1, 2, 3, etc.
sortOrder - the order that results will be sorted in.void setSearchedField(IndexField field)
field - the only field which will be searched.IndexField getSearchedField()
void setBlogUniquelyNamed(boolean uniquelyNamed)
boolean isBlogUniquelyNamed()
void setCollapseThreadMessages(boolean collapseThread)
boolean getCollapseThreadMessages()
int getMaxSearchResults()
void setMaxSearchResults(int maxSearchResults)
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||