@ProviderType
public interface SocialDataService
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SocialDataService.BrowseDocumentsResult
Used in browseDocuments to return the page of documents found and the count of all matching documents.
|
static class |
SocialDataService.Counts
Used in browseDocuments to indicate whether and which count of children is desired.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Object> attachment)
Add an attachment.
|
java.util.List<APIResult> |
batchCommit(java.util.List<APICommand> commands) |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
browseDocuments(java.lang.String keyName,
java.lang.String keyValue,
java.lang.String baseType,
int maxResults,
int page,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> orderBy,
boolean visibleOnly)
Browse the documents associated with the given key.
|
SocialDataService.BrowseDocumentsResult |
browseDocuments(java.lang.String keyName,
java.lang.String keyValue,
java.lang.String baseType,
int maxResults,
int page,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> orderBy,
boolean visibleOnly,
SocialDataService.Counts counts)
Browse the documents associated with the given key.
|
void |
close()
Close the service.
|
java.util.Map<java.lang.String,java.lang.Long> |
countChildren(java.util.List<java.lang.String> keyValues,
java.lang.String childType,
boolean visibleOnly)
Count the visible, or all the documents associated with the given keys.
|
long |
countChildren(java.lang.String keyValue,
java.lang.String childType,
boolean visibleOnly)
Count the visible, or all the documents associated with the given key.
|
void |
deleteAttachment(java.lang.String key)
Delete an attachment.
|
FacetResults |
facetedSearch(java.lang.String queryToAs,
java.util.List<java.lang.String> facetFields,
java.util.List<java.lang.String> pivotFields,
java.lang.String numRows,
java.lang.String mincount,
boolean isPivot)
Do a faceted search.
|
SocialResourceSearchResult<java.util.Map<java.lang.String,java.lang.Object>> |
find(java.lang.String componentFilter,
java.lang.String luceneQuery,
java.util.List<SearchSortField> sortFields,
int offset,
int limit)
Search.
|
SocialResourceSearchResult<java.util.Map<java.lang.String,java.lang.Object>> |
find(java.lang.String component,
java.lang.String solrQueryString,
java.util.List<SearchSortField> sortFields,
int offset,
int limit,
java.util.Map<java.lang.String,java.lang.Object> signals)
Search.
|
FacetSearchResult |
findFacets(java.util.List<java.lang.String> fieldNames,
java.util.List<FacetRangeField> rangeFields,
java.lang.String resourceTypeFilter,
java.lang.String componentFilter,
int count,
boolean visibleOnly,
boolean includeChildren)
Search collections Faceted search
|
SocialResourceSearchResult<java.util.Map<java.lang.String,java.lang.Object>> |
findFacets(java.util.List<java.lang.String> inPath,
java.util.List<java.lang.String> notInPath,
java.util.List<java.lang.String> fieldNames,
java.util.List<FacetRangeField> facetRanges,
java.lang.String scoredQueryString,
int maxFacetCount,
java.util.List<SearchSortField> sortFields,
int offset,
int pageSize)
Do a combined faceted search and filtered search, returning both the facets and an actual page of results
|
java.io.InputStream |
getAttachmentInputStream(java.lang.String path)
Get the attachment data as an InputStream and not just the meta data of the attachment
|
int |
getCommentIndex(java.lang.String keyName,
java.lang.String keyValue,
java.lang.String commentToCheck,
java.lang.String baseType,
boolean visibleOnly)
Get the index position of a reply amongst replies of a comment
|
java.lang.String |
getDSClient()
Return the placeholder for dataservice client EG: 'ASRP|MSRP'
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getMLTResults(java.lang.String query,
java.lang.String statusFilter,
java.lang.String resourceTypeFilter,
java.lang.String componentFilter,
java.util.List<java.lang.String> mltField,
int maxResults,
int minTermFreq,
int minDocFreq)
Look for documents close to the provided query.
|
boolean |
isConfigured() |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
nonFacetedSearch(java.lang.String queryToAs)
Do a regular search.
|
java.util.Map<java.lang.String,java.lang.Object> |
readAttachment(java.lang.String key)
Read an attachment.
|
java.util.Map<java.lang.String,java.lang.Object> |
readDocument(java.lang.String key)
Read a document.
|
java.util.Map<java.lang.String,APIResult> |
readDocuments(java.util.List<java.lang.String> keys)
Read a list of documents.
|
void |
setConfiguration(SocialResourceConfiguration configuration)
Set the configuration to use.
|
java.util.Map<java.lang.String,java.lang.Object> readDocument(java.lang.String key)
throws java.io.IOException
key - the keyjava.io.IOException - on failurejava.util.Map<java.lang.String,APIResult> readDocuments(java.util.List<java.lang.String> keys) throws java.io.IOException
keys - the keysjava.io.IOException - on failure to parsejava.util.List<APIResult> batchCommit(java.util.List<APICommand> commands) throws java.io.IOException
java.io.IOExceptionjava.util.List<java.util.Map<java.lang.String,java.lang.Object>> getMLTResults(java.lang.String query,
java.lang.String statusFilter,
java.lang.String resourceTypeFilter,
java.lang.String componentFilter,
java.util.List<java.lang.String> mltField,
int maxResults,
int minTermFreq,
int minDocFreq)
throws java.io.IOException
query - The string to matchstatusFilter - the status of the documents to matchresourceTypeFilter - the resource type(s) to matchcomponentFilter - the component to matchmltField - the field in the document to matchmaxResults - the most results to returnminTermFreq - the number of times a term has to be in the query to be usedminDocFreq - the number of docs a term has to be in for the term to be used.java.io.IOException - on failureSocialResourceSearchResult<java.util.Map<java.lang.String,java.lang.Object>> find(java.lang.String componentFilter, java.lang.String luceneQuery, java.util.List<SearchSortField> sortFields, int offset, int limit) throws java.io.IOException
componentFilter - the component to filter onluceneQuery - the lucene querysortFields - sort fieldsoffset - starting offsetlimit - max to returnjava.io.IOException - on failureSocialResourceSearchResult<java.util.Map<java.lang.String,java.lang.Object>> find(java.lang.String component, java.lang.String solrQueryString, java.util.List<SearchSortField> sortFields, int offset, int limit, java.util.Map<java.lang.String,java.lang.Object> signals) throws java.io.IOException
component - the component to filter onsolrQueryString - the lucene querysortFields - sort fieldsoffset - starting offsetlimit - max to returnsignals - contains query params(userlanguage, browserlanguge etc)java.io.IOException - on failureFacetSearchResult findFacets(java.util.List<java.lang.String> fieldNames, java.util.List<FacetRangeField> rangeFields, java.lang.String resourceTypeFilter, java.lang.String componentFilter, int count, boolean visibleOnly, boolean includeChildren) throws java.io.IOException
fieldNames - Fields for which we want facet countsresourceTypeFilter - Resource filtercomponentFilter - Component filtercount - Maximum number of resultsvisibleOnly - whether to filter by visibilityrangeFields - List of range fieldsincludeChildren - boolean flagjava.io.IOException - IOExceptionSocialResourceSearchResult<java.util.Map<java.lang.String,java.lang.Object>> findFacets(java.util.List<java.lang.String> inPath, java.util.List<java.lang.String> notInPath, java.util.List<java.lang.String> fieldNames, java.util.List<FacetRangeField> facetRanges, java.lang.String scoredQueryString, int maxFacetCount, java.util.List<SearchSortField> sortFields, int offset, int pageSize) throws java.io.IOException
inPath - a list of the parent paths to be searchedfieldNames - the fields being used for faceted searches by valuefacetRanges - the fields and intervals being used for faceted searches by rangescoredQueryString - a search string for which solr calculates degree of match (the "q" parameter)maxFacetCount - the limit of facet results to return, or 0 for no limitsortFields - fields to sort by, with their directions, in the returned resultsoffset - page offsetpageSize - page sizenotInPath - List of pathsjava.io.IOException - IOExceptionSocialDataService.BrowseDocumentsResult browseDocuments(java.lang.String keyName, java.lang.String keyValue, java.lang.String baseType, int maxResults, int page, java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> orderBy, boolean visibleOnly, @Nonnull SocialDataService.Counts counts) throws java.io.IOException
keyName - the name of the index to query onkeyValue - the value in the indexbaseType - the base type of the documents to list (can be empty or null)maxResults - the max number of result to return. If all results should be returned, send maxResults < 0page - the 0-based page of results to return. Only used if maxResults > 0orderBy - a list of field name and booleans to dictate the order of the results. For the boolean false is
descending order and true is to sort in ascending order.visibleOnly - whether to (true) return only visible documents, or (false) all documentscounts - whether to count matching documents and whether to count all documents or just the visible
documents.java.io.IOException - on failurejava.util.List<java.util.Map<java.lang.String,java.lang.Object>> browseDocuments(java.lang.String keyName,
java.lang.String keyValue,
java.lang.String baseType,
int maxResults,
int page,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> orderBy,
boolean visibleOnly)
throws java.io.IOException
keyName - the name of the index to query onkeyValue - the value in the indexbaseType - the base type of the documents to list (can be empty or null)maxResults - the max number of result to return. If all results should be returned, send maxResults < 0page - the 0-based page of results to return. Only used if maxResults > 0orderBy - a list of field name and booleans to dictate the order of the results. For the boolean false is
descending order and true is to sort in ascending order.visibleOnly - whether to (true) return only visible documents, or (false) all documentsjava.io.IOException - on failureint getCommentIndex(java.lang.String keyName,
java.lang.String keyValue,
java.lang.String commentToCheck,
java.lang.String baseType,
boolean visibleOnly)
keyName - the name of the index to query onkeyValue - the value in the indexcommentToCheck - the comment whose index need to be foundbaseType - the base type of the documents to list (can be empty or null)visibleOnly - whether to (true) return only visible documents, or (false) all documentsvoid addAttachment(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Object> attachment)
throws java.io.IOException
key - the keyattachment - the attachment datajava.io.IOException - on failurejava.util.Map<java.lang.String,java.lang.Object> readAttachment(java.lang.String key)
throws java.io.IOException
key - the keyjava.io.IOException - on failurelong countChildren(java.lang.String keyValue,
java.lang.String childType,
boolean visibleOnly)
throws java.io.IOException
keyValue - the value in the indexchildType - the value of the base_type to filter by, or null if no base type filtering should be donevisibleOnly - if true, the count of only the visible (not hidden, spam ..) docs is returnedjava.io.IOException - on failurejava.util.Map<java.lang.String,java.lang.Long> countChildren(java.util.List<java.lang.String> keyValues,
java.lang.String childType,
boolean visibleOnly)
throws java.io.IOException
keyValues - the path of each parent id to get a child count forchildType - the value of the base_type to filter by, or null if no base type filtering should be donevisibleOnly - if true, the count of only the visible (not hidden, spam ..) docs is returnedjava.io.IOException - on failurevoid close()
void deleteAttachment(java.lang.String key)
throws java.io.IOException
key - the key to be deleted.java.io.IOException - on failurevoid setConfiguration(SocialResourceConfiguration configuration)
configuration - the configuration.boolean isConfigured()
FacetResults facetedSearch(java.lang.String queryToAs, java.util.List<java.lang.String> facetFields, java.util.List<java.lang.String> pivotFields, java.lang.String numRows, java.lang.String mincount, boolean isPivot) throws java.io.IOException
queryToAs - the query to usefacetFields - the facet fields to usepivotFields - the pivot fields to usenumRows - the number of results to returnmincount - the min number of docs matching the facet to include the resultisPivot - true iff this is a pivot searchjava.io.IOException - on failurejava.util.List<java.util.Map<java.lang.String,java.lang.Object>> nonFacetedSearch(java.lang.String queryToAs)
throws java.io.IOException
queryToAs - the queryjava.io.IOException - on failurejava.io.InputStream getAttachmentInputStream(java.lang.String path)
throws java.io.IOException
path - path the to attachment resourcejava.io.IOException - on errorjava.lang.String getDSClient()
Copyright © 2010 - 2023 Adobe. All Rights Reserved