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(String key,
Map<String,Object> attachment)
Add an attachment.
|
List<APIResult> |
batchCommit(List<APICommand> commands) |
List<Map<String,Object>> |
browseDocuments(String keyName,
String keyValue,
String baseType,
int maxResults,
int page,
List<Map.Entry<String,Boolean>> orderBy,
boolean visibleOnly)
Browse the documents associated with the given key.
|
SocialDataService.BrowseDocumentsResult |
browseDocuments(String keyName,
String keyValue,
String baseType,
int maxResults,
int page,
List<Map.Entry<String,Boolean>> orderBy,
boolean visibleOnly,
SocialDataService.Counts counts)
Browse the documents associated with the given key.
|
void |
close()
Close the service.
|
Map<String,Long> |
countChildren(List<String> keyValues,
String childType,
boolean visibleOnly)
Count the visible, or all the documents associated with the given keys.
|
long |
countChildren(String keyValue,
String childType,
boolean visibleOnly)
Count the visible, or all the documents associated with the given key.
|
void |
deleteAttachment(String key)
Delete an attachment.
|
FacetResults |
facetedSearch(String queryToAs,
List<String> facetFields,
List<String> pivotFields,
String numRows,
String mincount,
boolean isPivot)
Do a faceted search.
|
SocialResourceSearchResult<Map<String,Object>> |
find(String componentFilter,
String luceneQuery,
List<SearchSortField> sortFields,
int offset,
int limit)
Search.
|
SocialResourceSearchResult<Map<String,Object>> |
find(String component,
String solrQueryString,
List<SearchSortField> sortFields,
int offset,
int limit,
Map<String,Object> signals)
Search.
|
FacetSearchResult |
findFacets(List<String> fieldNames,
List<FacetRangeField> rangeFields,
String resourceTypeFilter,
String componentFilter,
int count,
boolean visibleOnly,
boolean includeChildren)
Search collections Faceted search
|
SocialResourceSearchResult<Map<String,Object>> |
findFacets(List<String> inPath,
List<String> notInPath,
List<String> fieldNames,
List<FacetRangeField> facetRanges,
String scoredQueryString,
int maxFacetCount,
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
|
InputStream |
getAttachmentInputStream(String path)
Get the attachment data as an InputStream and not just the meta data of the attachment
|
String |
getDSClient()
Return the placeholder for dataservice client EG: 'ASRP|MSRP'
|
List<Map<String,Object>> |
getMLTResults(String query,
String statusFilter,
String resourceTypeFilter,
String componentFilter,
List<String> mltField,
int maxResults,
int minTermFreq,
int minDocFreq)
Look for documents close to the provided query.
|
boolean |
isConfigured() |
List<Map<String,Object>> |
nonFacetedSearch(String queryToAs)
Do a regular search.
|
Map<String,Object> |
readAttachment(String key)
Read an attachment.
|
Map<String,Object> |
readDocument(String key)
Read a document.
|
Map<String,APIResult> |
readDocuments(List<String> keys)
Read a list of documents.
|
void |
setConfiguration(SocialResourceConfiguration configuration)
Set the configuration to use.
|
Map<String,Object> readDocument(String key) throws IOException
key - the keyIOException - on failureMap<String,APIResult> readDocuments(List<String> keys) throws IOException
keys - the keysIOException - on failure to parseList<APIResult> batchCommit(List<APICommand> commands) throws IOException
IOExceptionList<Map<String,Object>> getMLTResults(String query, String statusFilter, String resourceTypeFilter, String componentFilter, List<String> mltField, int maxResults, int minTermFreq, int minDocFreq) throws 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.IOException - on failureSocialResourceSearchResult<Map<String,Object>> find(String componentFilter, String luceneQuery, List<SearchSortField> sortFields, int offset, int limit) throws IOException
componentFilter - the component to filter onluceneQuery - the lucene querysortFields - sort fieldsoffset - starting offsetlimit - max to returnIOException - on failureSocialResourceSearchResult<Map<String,Object>> find(String component, String solrQueryString, List<SearchSortField> sortFields, int offset, int limit, Map<String,Object> signals) throws IOException
component - the component to filter onsolrQueryString - the lucene querysortFields - sort fieldsoffset - starting offsetlimit - max to returnsignals - contains query params(userlanguage, browserlanguge etc)IOException - on failureFacetSearchResult findFacets(List<String> fieldNames, List<FacetRangeField> rangeFields, String resourceTypeFilter, String componentFilter, int count, boolean visibleOnly, boolean includeChildren) throws IOException
fieldNames - Fields for which we want facet countsresourceTypeFilter - Resource filtercomponentFilter - Component filtercount - Maximum number of resultsvisibleOnly - whether to filter by visibilityIOExceptionSocialResourceSearchResult<Map<String,Object>> findFacets(List<String> inPath, List<String> notInPath, List<String> fieldNames, List<FacetRangeField> facetRanges, String scoredQueryString, int maxFacetCount, List<SearchSortField> sortFields, int offset, int pageSize) throws 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 sizeIOExceptionSocialDataService.BrowseDocumentsResult browseDocuments(String keyName, String keyValue, String baseType, int maxResults, int page, List<Map.Entry<String,Boolean>> orderBy, boolean visibleOnly, SocialDataService.Counts counts) throws 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.IOException - on failureList<Map<String,Object>> browseDocuments(String keyName, String keyValue, String baseType, int maxResults, int page, List<Map.Entry<String,Boolean>> orderBy, boolean visibleOnly) throws 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 documentsIOException - on failurevoid addAttachment(String key, Map<String,Object> attachment) throws IOException
key - the keyattachment - the attachment dataIOException - on failureMap<String,Object> readAttachment(String key) throws IOException
key - the keyIOException - on failurelong countChildren(String keyValue, String childType, boolean visibleOnly) throws 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 returnedIOException - on failureMap<String,Long> countChildren(List<String> keyValues, String childType, boolean visibleOnly) throws 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 returnedIOException - on failurevoid close()
void deleteAttachment(String key) throws IOException
key - the key to be deleted.IOException - on failurevoid setConfiguration(SocialResourceConfiguration configuration)
configuration - the configuration.boolean isConfigured()
FacetResults facetedSearch(String queryToAs, List<String> facetFields, List<String> pivotFields, String numRows, String mincount, boolean isPivot) throws 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 searchIOException - on failureList<Map<String,Object>> nonFacetedSearch(String queryToAs) throws IOException
queryToAs - the queryIOException - on failureInputStream getAttachmentInputStream(String path) throws IOException
path - path the to attachment resourceIOException - on errorString getDSClient()
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"