Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface DocumentSearchQueryCriteria


public interface DocumentSearchQueryCriteria

Search criteria specific to searching documents may be specified using this criteria class.


Nested Class Summary
static class DocumentSearchQueryCriteria.DocumentSortType
          Represents how document search queries will be sorted
 
Method Summary
 DocumentType getFilteredDocumentType()
          Returns a DocumentType that query results are restricted to.
 java.util.Collection<java.lang.String> getLanguages()
          Returns the collection of languages that query results will be restricted to.
 DocumentSearchQueryCriteria.DocumentSortType getSortType()
          Returns the sort type to use to sort search results.
 boolean isCommentsIncludedInSearch()
          Returns whether comments are included in the search or not.
 void setCommentsIncludedInSearch(boolean include)
          Sets whether to include comments in the search or not.
 void setFilterOnDocumentType(DocumentType type)
          Restricts the query results to documents having the specified document type.
 void setLanguages(java.util.Collection<java.lang.String> languages)
          Sets the languages to restrict query results to.
 void setSortType(DocumentSearchQueryCriteria.DocumentSortType type)
          Sets the sort type to use to sort search results.
 

Method Detail

getSortType

DocumentSearchQueryCriteria.DocumentSortType getSortType()
Returns the sort type to use to sort search results. Default is DocumentSearchQueryCriteria.DocumentSortType.RELEVANCE

Returns:
sort type to use to sort search results

setSortType

void setSortType(DocumentSearchQueryCriteria.DocumentSortType type)
Sets the sort type to use to sort search results. Default is DocumentSearchQueryCriteria.DocumentSortType.RELEVANCE

Parameters:
type - the DocumentSortType that will be used for sorting.

getLanguages

java.util.Collection<java.lang.String> getLanguages()
Returns the collection of languages that query results will be restricted to. If no languages have been given (thus the returned list is empty) all allowed languages will be searched.

Returns:
a collection of languages that query results will be restricted to.

setLanguages

void setLanguages(java.util.Collection<java.lang.String> languages)
Sets the languages to restrict query results to.

Parameters:
languages - an collection of ISO-639 language codes.

getFilteredDocumentType

DocumentType getFilteredDocumentType()
Returns a DocumentType that query results are restricted to. If the query is not restricted to documents having a specific DocumentType, this method will return null.

Returns:
a DocumentType that the query results are restricted to.

setFilterOnDocumentType

void setFilterOnDocumentType(DocumentType type)
Restricts the query results to documents having the specified document type. Note: this method is not intended to show all documents of a particular document type. Rather, it lets you filter out search results; for example, all documents matching the query "Jive rocks", but filtering out all results that don't have the specified document type.

Parameters:
type - a document types to restrict query results to.

isCommentsIncludedInSearch

boolean isCommentsIncludedInSearch()
Returns whether comments are included in the search or not.

Returns:
true if comments are included in the search, false otherwise.

setCommentsIncludedInSearch

void setCommentsIncludedInSearch(boolean include)
Sets whether to include comments in the search or not.

Parameters:
include - true to include comments in the search, false otherwise.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.