com.clusterpoint.api.request
Class CPSSimilarDocumentRequest

java.lang.Object
  extended by com.clusterpoint.api.CPSRequest
      extended by com.clusterpoint.api.request.CPSSimilarDocumentRequest

public class CPSSimilarDocumentRequest
extends CPSRequest

The CPSSimilarDocumentRequest class is a wrapper for the CPSRequest class for the similar command for documents

See Also:
CPSSearchResponse

Field Summary
 
Fields inherited from class com.clusterpoint.api.CPSRequest
CPSREQUEST_TYPE_AUTO, CPSREQUEST_TYPE_CLUSTER, CPSREQUEST_TYPE_SINGLE
 
Constructor Summary
CPSSimilarDocumentRequest(java.lang.String query, int len, int quota, int offset, int docs)
          Constructs an instance of the CPSSimilarDocumentRequest class.
 
Method Summary
 void setId(java.lang.String id)
           
 void setQuery(java.lang.String query)
          Defines query that all found documents have to match against
 void setText(java.lang.String text)
           
 
Methods inherited from class com.clusterpoint.api.CPSRequest
get_requestTypeString, getCommand, getRequestID, getRequestType, getRequestXml, setParam, setParam, setRequestID, setRequestType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPSSimilarDocumentRequest

public CPSSimilarDocumentRequest(java.lang.String query,
                                 int len,
                                 int quota,
                                 int offset,
                                 int docs)
                          throws java.lang.Exception
Constructs an instance of the CPSSimilarDocumentRequest class.

Parameters:
len - number of keywords to extract from the source
quota - minimum number of keywords matching in the destination
offset - number of results to skip before returning the following ones
docs - number of documents to retrieve
Throws:
java.lang.Exception
Method Detail

setId

public void setId(java.lang.String id)
           throws java.lang.Exception
Parameters:
id - ID of the source document - the one that You want to search similar documents to
Throws:
java.lang.Exception

setText

public void setText(java.lang.String text)
             throws java.lang.Exception
Parameters:
text - A chunk of text that the found documents have to be similar to
Throws:
java.lang.Exception

setQuery

public void setQuery(java.lang.String query)
              throws java.lang.Exception
Defines query that all found documents have to match against

Parameters:
query - query string
Throws:
java.lang.Exception