public class MatchV2Service extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ApiEndpoints |
_endpoints |
protected EnvironmentSettings |
_settings |
| Constructor and Description |
|---|
MatchV2Service(okhttp3.OkHttpClient httpClient,
EnvironmentSettings settings)
Do not use this.
|
| Modifier and Type | Method and Description |
|---|---|
AddCandidateResponse |
addCandidate(String documentId,
ParsedResume resume,
List<String> roles,
boolean anonymize,
Map<String,String> customFields)
Upload a candidates CV to the search and match V2 environment.
|
AddJobResponse |
addJob(String documentId,
ParsedJob job,
List<String> roles,
Map<String,String> customFields)
Upload a job to the search and match V2 environment.
|
AutocompleteResponse |
autocompleteCandidates(AutocompleteCandidatesField field,
String input,
String... languages)
Returns a list of suggested Completions.
|
AutocompleteResponse |
autocompleteJobs(AutocompleteJobsField field,
String input,
String... languages)
Returns a list of suggested Completions.
|
protected okhttp3.RequestBody |
createJsonBody(Object body) |
DeleteDocumentsResponse |
deleteCandidates(List<String> documentIds)
Delete candidate documents from environment
|
DeleteDocumentsResponse |
deleteJobs(List<String> documentIds)
Delete job documents from environment
|
protected <T extends ApiResponse<?>> |
executeRequest(okhttp3.Request apiRequest,
Class<T> classOfT,
String requestBody) |
SearchResponse |
matchCandidates(DocumentSource sourceDocument,
Options options,
SearchQuery query)
Match an existing candidate document with filters provided.
|
SearchResponse |
matchJobs(DocumentSource sourceDocument,
Options options,
SearchQuery query)
Match an existing job document with filters provided.
|
SearchResponse |
searchCandidates(SearchQuery query,
Options options)
Search for a candidate based on the query provided.
|
SearchResponse |
searchJobs(SearchQuery query,
Options options)
Search for a job based on the query provided.
|
protected void |
setEnvironment(IndexingOptionsGeneric options) |
protected final EnvironmentSettings _settings
protected final ApiEndpoints _endpoints
public MatchV2Service(okhttp3.OkHttpClient httpClient,
EnvironmentSettings settings)
TxClient.searchMatchV2()httpClient - The http client for API callssettings - environment settingspublic AddCandidateResponse addCandidate(String documentId, ParsedResume resume, List<String> roles, boolean anonymize, Map<String,String> customFields) throws TxException
documentId - The id to use for the documentresume - Parsed output from the Textkernel CV/Resume Parserroles - (optional) The roles associated with the request. Defaults to ["All"] if none are provided.anonymize - (optional) A boolean flag to strip PII data out of the resume before indexingcustomFields - (optional) A collection of custom fields represented as key-value pairsTxException - Thrown when an API error occurspublic AddJobResponse addJob(String documentId, ParsedJob job, List<String> roles, Map<String,String> customFields) throws TxException
documentId - The id to use for the documentjob - Parsed output from the Textkernel Job Parserroles - (optional) The roles associated with the request. Defaults to ["All"] if none are provided.customFields - (optional) A collection of custom fields represented as key-value pairsTxException - Thrown when an API error occurspublic DeleteDocumentsResponse deleteCandidates(List<String> documentIds) throws TxException
documentIds - The document IDs to deleteTxException - Thrown when an API error occurspublic DeleteDocumentsResponse deleteJobs(List<String> documentIds) throws TxException
documentIds - The document IDs to deleteTxException - Thrown when an API error occurspublic SearchResponse matchCandidates(DocumentSource sourceDocument, Options options, SearchQuery query) throws TxException
sourceDocument - The document to generate the search query fromoptions - Options for the Match requestquery - (optional) The query object that will be combined with the match query to drive the searchTxException - Thrown when an API error occurspublic SearchResponse matchJobs(DocumentSource sourceDocument, Options options, SearchQuery query) throws TxException
sourceDocument - The document to generate the search query fromoptions - Options for the Match requestquery - (optional) The query object that will be combined with the match query to drive the searchTxException - Thrown when an API error occurspublic SearchResponse searchCandidates(SearchQuery query, Options options) throws TxException
query - The query object that will drive the search.options - Options for the search requestTxException - Thrown when an API error occurspublic SearchResponse searchJobs(SearchQuery query, Options options) throws TxException
query - The query object that will drive the search.options - Options for the search requestTxException - Thrown when an API error occurspublic AutocompleteResponse autocompleteCandidates(AutocompleteCandidatesField field, String input, String... languages) throws TxException
field - Which field to use to retrieve completionsinput - The user-typed input stringlanguages - Optional 2-letter ISO-639-1 language codes. The first language is used for field label translations.
All languages are used to retrieve completions when the environment doesn't have default languages set.TxException - Thrown when an API error occurspublic AutocompleteResponse autocompleteJobs(AutocompleteJobsField field, String input, String... languages) throws TxException
field - Which field to use to retrieve completionsinput - The user-typed input stringlanguages - Optional 2-letter ISO-639-1 language codes. The first language is used for field label translations.
All languages are used to retrieve completions when the environment doesn't have default languages set.TxException - Thrown when an API error occursprotected void setEnvironment(IndexingOptionsGeneric options)
protected okhttp3.RequestBody createJsonBody(Object body)
protected <T extends ApiResponse<?>> HttpResponse<T> executeRequest(okhttp3.Request apiRequest, Class<T> classOfT, String requestBody) throws TxException
TxExceptionCopyright © 2025. All rights reserved.