public class SovrenClient extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
ShowFullRequestBodyInExceptions
Set to
true for debugging API errors. |
| Constructor and Description |
|---|
SovrenClient(String accountId,
String serviceKey,
DataCenter dataCenter)
Create an SDK client to perform Sovren API calls with the account information found at https://portal.sovren.com
|
SovrenClient(String accountId,
String serviceKey,
DataCenter dataCenter,
List<String> trackingTags)
Create an SDK client to perform Sovren API calls with the account information found at https://portal.sovren.com
|
| Modifier and Type | Method and Description |
|---|---|
<TTarget extends IParsedDocWithId> |
bimetricScore(ParsedJobWithId sourceJob,
List<TTarget> targetDocuments,
CategoryWeights preferredWeights,
SearchMatchSettings settings)
Score one or more target documents against a source job
|
<TTarget extends IParsedDocWithId> |
bimetricScore(ParsedResumeWithId sourceResume,
List<TTarget> targetDocuments,
CategoryWeights preferredWeights,
SearchMatchSettings settings)
Score one or more target documents against a source resume
|
CreateIndexResponse |
createIndex(IndexType type,
String indexId)
Create a new index
|
DeleteDocumentResponse |
deleteDocument(String indexId,
String documentId)
Delete an existing document from an index
|
DeleteIndexResponse |
deleteIndex(String indexId)
Delete an existing index.
|
DeleteMultipleDocumentsResponse |
deleteMultipleDocuments(String indexId,
List<String> documentIds)
Delete a group of existing documents from an index
|
GeocodeJobResponse |
geocode(ParsedJob job,
Address address,
GeocodeCredentials geocodeCredentials)
Use this if you would like to provide an address for geocoding instead of using the one in the parsed
job.
|
GeocodeJobResponse |
geocode(ParsedJob job,
GeocodeCredentials geocodeCredentials)
Uses the address in the job (if present) to look up geocoordinates and add them into the ParsedJob object.
|
GeocodeResumeResponse |
geocode(ParsedResume resume,
Address address,
GeocodeCredentials geocodeCredentials)
Use this if you would like to provide an address for geocoding instead of using the one in the parsed
resume.
|
GeocodeResumeResponse |
geocode(ParsedResume resume,
GeocodeCredentials geocodeCredentials)
Uses the address in the resume (if present) to look up geocoordinates and add them into the ParsedResume object.
|
GeocodeAndIndexJobResponse |
geocodeAndIndex(ParsedJob job,
IndexSingleDocumentInfo indexingOptions,
Address address,
boolean indexIfGeocodeFails,
GeocodeCredentials geocodeCredentials)
Use this if you would like to provide an address for geocoding instead of using the one in the parsed
rjobesume.
|
GeocodeAndIndexJobResponse |
geocodeAndIndex(ParsedJob job,
IndexSingleDocumentInfo indexingOptions,
boolean indexIfGeocodeFails,
GeocodeCredentials geocodeCredentials)
Uses the address in the job (if present) to look up geocoordinates and add them into the ParsedJob object.
|
GeocodeAndIndexJobResponse |
geocodeAndIndex(ParsedJob job,
IndexSingleDocumentInfo indexingOptions,
GeoCoordinates coordinates,
boolean indexIfGeocodeFails,
GeocodeCredentials geocodeCredentials)
Use this if you already have latitude/longitude coordinates and simply wish to add them to your parsed job.
|
GeocodeAndIndexResumeResponse |
geocodeAndIndex(ParsedResume resume,
IndexSingleDocumentInfo indexingOptions,
Address address,
boolean indexIfGeocodeFails,
GeocodeCredentials geocodeCredentials)
Use this if you would like to provide an address for geocoding instead of using the one in the parsed
resume.
|
GeocodeAndIndexResumeResponse |
geocodeAndIndex(ParsedResume resume,
IndexSingleDocumentInfo indexingOptions,
boolean indexIfGeocodeFails,
GeocodeCredentials geocodeCredentials)
Uses the address in the resume (if present) to look up geocoordinates and add them into the ParsedResume object.
|
GeocodeAndIndexResumeResponse |
geocodeAndIndex(ParsedResume resume,
IndexSingleDocumentInfo indexingOptions,
GeoCoordinates coordinates,
boolean indexIfGeocodeFails,
GeocodeCredentials geocodeCredentials)
Use this if you already have latitude/longitude coordinates and simply wish to add them to your parsed resume.
|
GetAccountInfoResponse |
getAccountInfo()
Get the account info (remaining credits, max concurrency, etc).
|
GetAllIndexesResponse |
getAllIndexes()
Get all existing indexes
|
GetJobResponse |
getJob(String indexId,
String documentId)
Retrieve an existing job from an index
|
GetResumeResponse |
getResume(String indexId,
String documentId)
Retrieve an existing resume from an index
|
IndexDocumentResponse |
indexDocument(ParsedJob job,
String indexId,
String documentId,
List<String> userDefinedTags)
Add a job to an existing index
|
IndexDocumentResponse |
indexDocument(ParsedResume resume,
String indexId,
String documentId,
List<String> userDefinedTags)
Add a resume to an existing index
|
IndexMultipleDocumentsResponse |
indexMultipleJobs(List<IndexJobInfo> jobs,
String indexId)
Add several jobs to an existing index
|
IndexMultipleDocumentsResponse |
indexMultipleResumes(List<IndexResumeInfo> resumes,
String indexId)
Add several resumes to an existing index
|
MatchResponse |
match(ParsedJob job,
List<String> indexesToQuery,
CategoryWeights preferredWeights,
FilterCriteria filters,
SearchMatchSettings settings,
int numResults)
Find matches for a non-indexed job.
|
MatchResponse |
match(ParsedResume resume,
List<String> indexesToQuery,
CategoryWeights preferredWeights,
FilterCriteria filters,
SearchMatchSettings settings,
int numResults)
Find matches for a non-indexed resume.
|
MatchResponse |
match(String indexId,
String documentId,
List<String> indexesToQuery,
CategoryWeights preferredWeights,
FilterCriteria filters,
SearchMatchSettings settings,
int numResults)
Find matches for a resume or job that is already indexed
|
ParseJobResponse |
parseJob(ParseRequest request)
Parse a job
|
ParseResumeResponse |
parseResume(ParseRequest request)
Parse a resume
|
SearchResponse |
search(List<String> indexesToQuery,
FilterCriteria query,
SearchMatchSettings settings,
PaginationSettings pagination)
Search for resumes or jobs that meet specific criteria
|
SovrenUIClient |
ui(MatchUISettings uiOptions)
Access methods for generating Sovren Matching UI sessions.
|
UpdateUserDefinedTagsResponse |
updateJobUserDefinedTags(String indexId,
String documentId,
List<String> userDefinedTags,
UserDefinedTagsMethod method)
Updates the user-defined tags for a job
|
UpdateUserDefinedTagsResponse |
updateResumeUserDefinedTags(String indexId,
String documentId,
List<String> userDefinedTags,
UserDefinedTagsMethod method)
Updates the user-defined tags for a resume
|
public boolean ShowFullRequestBodyInExceptions
true for debugging API errors. It will show the full JSON request body in SovrenException.RequestBody
true in your production system, as it increases the memory footprintpublic SovrenClient(String accountId, String serviceKey, DataCenter dataCenter)
accountId - - The account id for your accountserviceKey - - The service key for your accountdataCenter - - The Data Center for your account. Either DataCenter.US or DataCenter.EUIllegalArgumentException - if the accountId, serviceKey, or dataCenter are null/emptypublic SovrenClient(String accountId, String serviceKey, DataCenter dataCenter, List<String> trackingTags)
accountId - - The account id for your accountserviceKey - - The service key for your accountdataCenter - - The Data Center for your account. Either DataCenter.US or DataCenter.EUtrackingTags - - Optional tags to use to track API usage for your accountIllegalArgumentException - if the accountId, serviceKey, or dataCenter are null/emptypublic GetAccountInfoResponse getAccountInfo() throws SovrenException
SovrenException - Thrown when an API error occurspublic ParseResumeResponse parseResume(ParseRequest request) throws SovrenException
request - The request bodySovrenException - Thrown when an API error occurspublic ParseJobResponse parseJob(ParseRequest request) throws SovrenException
request - The request bodySovrenException - Thrown when an API error occurspublic CreateIndexResponse createIndex(IndexType type, String indexId) throws SovrenException
type - The type of documents stored in this index. Either 'Resume' or 'Job'indexId - The ID to assign to the new index. This is restricted to alphanumeric with dashes
and underscores. All values will be converted to lower-case.SovrenException - Thrown when an API error occurspublic GetAllIndexesResponse getAllIndexes() throws SovrenException
SovrenException - Thrown when an API error occurspublic DeleteIndexResponse deleteIndex(String indexId) throws SovrenException
indexId - The index to delete (case-insensitive).SovrenException - Thrown when an API error occurspublic IndexDocumentResponse indexDocument(ParsedResume resume, String indexId, String documentId, List<String> userDefinedTags) throws SovrenException
resume - A resume generated by the Sovren Resume ParserindexId - The index the document should be added into (case-insensitive).documentId - The ID to assign to the new document. This is restricted to alphanumeric
with dashes and underscores. All values will be converted to lower-case.userDefinedTags - The user-defined tags that the resume should have, or nullSovrenException - Thrown when an API error occurspublic IndexDocumentResponse indexDocument(ParsedJob job, String indexId, String documentId, List<String> userDefinedTags) throws SovrenException
job - A job generated by the Sovren Job ParserindexId - The index the document should be added into (case-insensitive).documentId - The ID to assign to the new document. This is restricted to alphanumeric
with dashes and underscores. All values will be converted to lower-case.userDefinedTags - The user-defined tags that the resume should have, or nullSovrenException - Thrown when an API error occurspublic IndexMultipleDocumentsResponse indexMultipleResumes(List<IndexResumeInfo> resumes, String indexId) throws SovrenException
resumes - The resumes generated by the Sovren Resume Parser paired with their DocumentIdsindexId - The index the documents should be added into (case-insensitive).SovrenException - Thrown when an API error occurspublic IndexMultipleDocumentsResponse indexMultipleJobs(List<IndexJobInfo> jobs, String indexId) throws SovrenException
jobs - The jobs generated by the Sovren Job Parser paired with their DocumentIdsindexId - The index the documents should be added into (case-insensitive).SovrenException - Thrown when an API error occurspublic DeleteDocumentResponse deleteDocument(String indexId, String documentId) throws SovrenException
indexId - The index containing the documentdocumentId - The ID of the document to deleteSovrenException - Thrown when an API error occurspublic DeleteMultipleDocumentsResponse deleteMultipleDocuments(String indexId, List<String> documentIds) throws SovrenException
indexId - The index containing the documentsdocumentIds - The IDs of the documents to deleteSovrenException - Thrown when an API error occurspublic GetResumeResponse getResume(String indexId, String documentId) throws SovrenException
indexId - The index containing the resumedocumentId - The ID of the resume to retrieveSovrenException - Thrown when an API error occurspublic GetJobResponse getJob(String indexId, String documentId) throws SovrenException
indexId - The index containing the jobdocumentId - The ID of the job to retrieveSovrenException - Thrown when an API error occurspublic UpdateUserDefinedTagsResponse updateResumeUserDefinedTags(String indexId, String documentId, List<String> userDefinedTags, UserDefinedTagsMethod method) throws SovrenException
indexId - The index containing the resumedocumentId - The ID of the resume to updateuserDefinedTags - The user-defined tags to add/delete/etcmethod - Which method to use for the specified user-defined tagsSovrenException - Thrown when an API error occurspublic UpdateUserDefinedTagsResponse updateJobUserDefinedTags(String indexId, String documentId, List<String> userDefinedTags, UserDefinedTagsMethod method) throws SovrenException
indexId - The index containing the jobdocumentId - The ID of the job to updateuserDefinedTags - The user-defined tags to add/delete/etcmethod - Which method to use for the specified user-defined tagsSovrenException - Thrown when an API error occurspublic MatchResponse match(ParsedResume resume, List<String> indexesToQuery, CategoryWeights preferredWeights, FilterCriteria filters, SearchMatchSettings settings, int numResults) throws SovrenException
resume - The resume (generated by the Sovren Resume Parser) to use as the source for a match queryindexesToQuery - The indexes to find results in. These must all be of the same type (resumes or jobs)preferredWeights - The preferred category weights for scoring the results. If null,
Sovren will determine the best values based on the source resumefilters - Any filters to apply prior to the match (a result must satisfy all the filters), or nullsettings - The settings for this match request. Use null for defaults.numResults - The number of results to show. Use 0 for the default.SovrenException - Thrown when an API error occurspublic MatchResponse match(ParsedJob job, List<String> indexesToQuery, CategoryWeights preferredWeights, FilterCriteria filters, SearchMatchSettings settings, int numResults) throws SovrenException
job - The job (generated by the Sovren Job Parser) to use as the source for a match queryindexesToQuery - The indexes to find results in. These must all be of the same type (resumes or jobs)preferredWeights - The preferred category weights for scoring the results. If null,
Sovren will determine the best values based on the source jobfilters - Any filters to apply prior to the match (a result must satisfy all the filters), or nullsettings - The settings for this match request. Use null for defaults.numResults - The number of results to show. Use 0 for the default.SovrenException - Thrown when an API error occurspublic MatchResponse match(String indexId, String documentId, List<String> indexesToQuery, CategoryWeights preferredWeights, FilterCriteria filters, SearchMatchSettings settings, int numResults) throws SovrenException
indexId - The index containing the document you want to matchdocumentId - The ID of the document to matchindexesToQuery - The indexes to find results in. These must all be of the same type (resumes or jobs)preferredWeights - The preferred category weights for scoring the results. If null,
Sovren will determine the best values based on the source resume/jobfilters - Any filters to apply prior to the match (a result must satisfy all the filters), or nullsettings - The settings for this match request. Use null for defaults.numResults - The number of results to show. Use 0 for the default.SovrenException - Thrown when an API error occurspublic SearchResponse search(List<String> indexesToQuery, FilterCriteria query, SearchMatchSettings settings, PaginationSettings pagination) throws SovrenException
indexesToQuery - The indexes to find results in. These must all be of the same type (resumes or jobs)query - The search query. A result must satisfy all of these criteriasettings - The settings for this search request. Use null for defaults.pagination - Pagination settings. Use null for defaults.SovrenException - Thrown when an API error occurspublic <TTarget extends IParsedDocWithId> BimetricScoreResponse bimetricScore(ParsedResumeWithId sourceResume, List<TTarget> targetDocuments, CategoryWeights preferredWeights, SearchMatchSettings settings) throws SovrenException
TTarget - Either ParsedResumeWithId or ParsedJobWithIdsourceResume - The source resumetargetDocuments - The target resumes/jobspreferredWeights - The preferred category weights for scoring the results. If null,
Sovren will determine the best values based on the source resume.settings - The settings for this search request. Use null for defaults.SovrenException - Thrown when an API error occurspublic <TTarget extends IParsedDocWithId> BimetricScoreResponse bimetricScore(ParsedJobWithId sourceJob, List<TTarget> targetDocuments, CategoryWeights preferredWeights, SearchMatchSettings settings) throws SovrenException
TTarget - Either ParsedResumeWithId or ParsedJobWithIdsourceJob - The source jobtargetDocuments - The target resumes/jobspreferredWeights - The preferred category weights for scoring the results. If null,
Sovren will determine the best values based on the source job.settings - The settings for this search request. Use null for defaults.SovrenException - Thrown when an API error occurspublic GeocodeResumeResponse geocode(ParsedResume resume, GeocodeCredentials geocodeCredentials) throws SovrenException
resume - The resume to insert the geocoordinates (from the address) intogeocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeResumeResponse geocode(ParsedResume resume, Address address, GeocodeCredentials geocodeCredentials) throws SovrenException
resume - The resume to insert the geocoordinates (from the address) intoaddress - The address to use to retrieve geocoordinatesgeocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeJobResponse geocode(ParsedJob job, GeocodeCredentials geocodeCredentials) throws SovrenException
job - The job to insert the geocoordinates (from the address) intogeocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeJobResponse geocode(ParsedJob job, Address address, GeocodeCredentials geocodeCredentials) throws SovrenException
job - The job to insert the geocoordinates (from the address) intoaddress - The address to use to retrieve geocoordinatesgeocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeAndIndexResumeResponse geocodeAndIndex(ParsedResume resume, IndexSingleDocumentInfo indexingOptions, boolean indexIfGeocodeFails, GeocodeCredentials geocodeCredentials) throws SovrenException
resume - The resume to geocodeindexingOptions - What index/document id to use to index the document after geocodingindexIfGeocodeFails - Indicates whether or not the document should still be added to the index if the geocode request fails.geocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeAndIndexResumeResponse geocodeAndIndex(ParsedResume resume, IndexSingleDocumentInfo indexingOptions, Address address, boolean indexIfGeocodeFails, GeocodeCredentials geocodeCredentials) throws SovrenException
resume - The resume to insert the geocoordinates (from the address) intoindexingOptions - What index/document id to use to index the document after geocodingaddress - The address to use to retrieve geocoordinatesindexIfGeocodeFails - Indicates whether or not the document should still be added to the index if the geocode request fails.geocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeAndIndexResumeResponse geocodeAndIndex(ParsedResume resume, IndexSingleDocumentInfo indexingOptions, GeoCoordinates coordinates, boolean indexIfGeocodeFails, GeocodeCredentials geocodeCredentials) throws SovrenException
resume - The resume to insert the geocoordinates intoindexingOptions - What index/document id to use to index the document after geocodingcoordinates - The geocoordinates to useindexIfGeocodeFails - Indicates whether or not the document should still be added to the index if the geocode request fails.geocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeAndIndexJobResponse geocodeAndIndex(ParsedJob job, IndexSingleDocumentInfo indexingOptions, boolean indexIfGeocodeFails, GeocodeCredentials geocodeCredentials) throws SovrenException
job - The job to geocodeindexingOptions - What index/document id to use to index the document after geocodingindexIfGeocodeFails - Indicates whether or not the document should still be added to the index if the geocode request fails.geocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeAndIndexJobResponse geocodeAndIndex(ParsedJob job, IndexSingleDocumentInfo indexingOptions, Address address, boolean indexIfGeocodeFails, GeocodeCredentials geocodeCredentials) throws SovrenException
job - The job to insert the geocoordinates (from the address) intoindexingOptions - What index/document id to use to index the document after geocodingaddress - The address to use to retrieve geocoordinatesindexIfGeocodeFails - Indicates whether or not the document should still be added to the index if the geocode request fails.geocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic GeocodeAndIndexJobResponse geocodeAndIndex(ParsedJob job, IndexSingleDocumentInfo indexingOptions, GeoCoordinates coordinates, boolean indexIfGeocodeFails, GeocodeCredentials geocodeCredentials) throws SovrenException
job - The job to insert the geocoordinates intoindexingOptions - What index/document id to use to index the document after geocodingcoordinates - The geocoordinates to useindexIfGeocodeFails - Indicates whether or not the document should still be added to the index if the geocode request fails.geocodeCredentials - - The credentials you want to use for geocoding (use null for Sovren credentials)SovrenException - Thrown when an API error occurredpublic SovrenUIClient ui(MatchUISettings uiOptions)
sovClient.UI(options).search(...)uiOptions - Options/settings for the Matching UI.
UIOptions.Username (in MatchUISettings.UIOptions),
the user will be prompted to login as soon as the Matching UI session is loadedCopyright © 2021. All rights reserved.