Table of Contents

Interface ISearchMatchService

Namespace
Textkernel.Tx.Services
Assembly
Textkernel.Tx.SDK.dll
public interface ISearchMatchService

Methods

BimetricScore<TTarget>(ParsedJobWithId, List<TTarget>, CategoryWeights, SearchMatchSettings)

Score one or more target documents against a source job

Task<BimetricScoreResponse> BimetricScore<TTarget>(ParsedJobWithId sourceJob, List<TTarget> targetDocuments, CategoryWeights preferredWeights = null, SearchMatchSettings settings = null) where TTarget : IParsedDocWithId

Parameters

sourceJob ParsedJobWithId

The source job

targetDocuments List<TTarget>

The target resumes/jobs

preferredWeights CategoryWeights

The preferred category weights for scoring the results. If none are provided, The best values will be determined based on the source job

settings SearchMatchSettings

Settings to be used for this scoring request

Returns

Task<BimetricScoreResponse>

Type Parameters

TTarget

Either ParsedResumeWithId or ParsedJobWithId

Exceptions

TxException

Thrown when an API error occurs

BimetricScore<TTarget>(ParsedResumeWithId, List<TTarget>, CategoryWeights, SearchMatchSettings)

Score one or more target documents against a source resume

Task<BimetricScoreResponse> BimetricScore<TTarget>(ParsedResumeWithId sourceResume, List<TTarget> targetDocuments, CategoryWeights preferredWeights = null, SearchMatchSettings settings = null) where TTarget : IParsedDocWithId

Parameters

sourceResume ParsedResumeWithId

The source resume

targetDocuments List<TTarget>

The target resumes/jobs

preferredWeights CategoryWeights

The preferred category weights for scoring the results. If none are provided, The best values will be determined based on the source resume

settings SearchMatchSettings

Settings to be used for this scoring request

Returns

Task<BimetricScoreResponse>

Type Parameters

TTarget

Either ParsedResumeWithId or ParsedJobWithId

Exceptions

TxException

Thrown when an API error occurs

CreateIndex(IndexType, string)

Create a new index

Task<CreateIndexResponse> CreateIndex(IndexType type, string indexId)

Parameters

type IndexType

The type of documents stored in this index. Either 'Resume' or 'Job'

indexId string

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.

Returns

Task<CreateIndexResponse>

Exceptions

TxException

Thrown when an API error occurs

DeleteDocument(string, string)

Delete an existing document from an index

Task<DeleteDocumentResponse> DeleteDocument(string indexId, string documentId)

Parameters

indexId string

The index containing the document

documentId string

The ID of the document to delete

Returns

Task<DeleteDocumentResponse>

Exceptions

TxException

Thrown when an API error occurs

DeleteIndex(string)

Delete an existing index. Note that this is a destructive action and cannot be undone. All the documents in this index will be deleted.

Task<DeleteIndexResponse> DeleteIndex(string indexId)

Parameters

indexId string

Returns

Task<DeleteIndexResponse>

Exceptions

TxException

Thrown when an API error occurs

DeleteMultipleDocuments(string, IEnumerable<string>)

Delete a group of existing documents from an index

Task<DeleteMultipleDocumentsResponse> DeleteMultipleDocuments(string indexId, IEnumerable<string> documentIds)

Parameters

indexId string

The index containing the documents

documentIds IEnumerable<string>

The IDs of the documents to delete

Returns

Task<DeleteMultipleDocumentsResponse>

Exceptions

TxException

Thrown when an API error occurs

GetAllIndexes()

Get all existing indexes

Task<GetAllIndexesResponse> GetAllIndexes()

Returns

Task<GetAllIndexesResponse>

Exceptions

TxException

Thrown when an API error occurs

GetJob(string, string)

Retrieve an existing job from an index

Task<GetJobResponse> GetJob(string indexId, string documentId)

Parameters

indexId string

The index containing the job

documentId string

The ID of the job to retrieve

Returns

Task<GetJobResponse>

Exceptions

TxException

Thrown when an API error occurs

GetResume(string, string)

Retrieve an existing resume from an index

Task<GetResumeResponse> GetResume(string indexId, string documentId)

Parameters

indexId string

The index containing the resume

documentId string

The ID of the resume to retrieve

Returns

Task<GetResumeResponse>

Exceptions

TxException

Thrown when an API error occurs

IndexDocument(ParsedJob, string, string, IEnumerable<string>)

Add a job to an existing index

Task<IndexDocumentResponse> IndexDocument(ParsedJob job, string indexId, string documentId, IEnumerable<string> userDefinedTags = null)

Parameters

job ParsedJob

A job generated by the Job Parser

indexId string

The index the document should be added into (case-insensitive).

documentId string

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 IEnumerable<string>

The user-defined tags that the job should have

Returns

Task<IndexDocumentResponse>

Exceptions

TxException

Thrown when an API error occurs

IndexDocument(ParsedResume, string, string, IEnumerable<string>)

Add a resume to an existing index

Task<IndexDocumentResponse> IndexDocument(ParsedResume resume, string indexId, string documentId, IEnumerable<string> userDefinedTags = null)

Parameters

resume ParsedResume

A resume generated by the Resume Parser

indexId string

The index the document should be added into (case-insensitive).

documentId string

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 IEnumerable<string>

The user-defined tags that the resume should have

Returns

Task<IndexDocumentResponse>

Exceptions

TxException

Thrown when an API error occurs

IndexMultipleDocuments(IEnumerable<IndexJobInfo>, string)

Add several jobs to an existing index

Task<IndexMultipleDocumentsResponse> IndexMultipleDocuments(IEnumerable<IndexJobInfo> jobs, string indexId)

Parameters

jobs IEnumerable<IndexJobInfo>

The jobs generated by the Job Parser paired with their DocumentIds

indexId string

The index the jobs should be added into (case-insensitive).

Returns

Task<IndexMultipleDocumentsResponse>

Exceptions

TxException

Thrown when an API error occurs

IndexMultipleDocuments(IEnumerable<IndexResumeInfo>, string)

Add several resumes to an existing index

Task<IndexMultipleDocumentsResponse> IndexMultipleDocuments(IEnumerable<IndexResumeInfo> resumes, string indexId)

Parameters

resumes IEnumerable<IndexResumeInfo>

The resumes generated by the Resume Parser paired with their DocumentIds

indexId string

The index the resumes should be added into (case-insensitive).

Returns

Task<IndexMultipleDocumentsResponse>

Exceptions

TxException

Thrown when an API error occurs

Match(string, string, IEnumerable<string>, CategoryWeights, FilterCriteria, SearchMatchSettings, int)

Find matches for a resume or job that is already indexed

Task<MatchResponse> Match(string indexId, string documentId, IEnumerable<string> indexesToQuery, CategoryWeights preferredWeights = null, FilterCriteria filters = null, SearchMatchSettings settings = null, int numResults = 0)

Parameters

indexId string

The index containing the document you want to match

documentId string

The ID of the document to match

indexesToQuery IEnumerable<string>

The indexes to find results in. These must all be of the same type (resumes or jobs)

preferredWeights CategoryWeights

The preferred category weights for scoring the results. If none are provided, The best values will be determined based on the source resume/job

filters FilterCriteria

Any filters to apply prior to the match (a result must satisfy all the filters)

settings SearchMatchSettings

Settings for this match

numResults int

The number of results to show. If not specified, the default will be used.

Returns

Task<MatchResponse>

Exceptions

TxException

Thrown when an API error occurs

Match(ParsedJob, IEnumerable<string>, CategoryWeights, FilterCriteria, SearchMatchSettings, int)

Find matches for a non-indexed job.

Task<MatchResponse> Match(ParsedJob job, IEnumerable<string> indexesToQuery, CategoryWeights preferredWeights = null, FilterCriteria filters = null, SearchMatchSettings settings = null, int numResults = 0)

Parameters

job ParsedJob

The job (generated by the Job Parser) to use as the source for a match query

indexesToQuery IEnumerable<string>

The indexes to find results in. These must all be of the same type (resumes or jobs)

preferredWeights CategoryWeights

The preferred category weights for scoring the results. If none are provided, The best values will be determined based on the source job

filters FilterCriteria

Any filters to apply prior to the match (a result must satisfy all the filters)

settings SearchMatchSettings

Settings for this match

numResults int

The number of results to show. If not specified, the default will be used.

Returns

Task<MatchResponse>

Exceptions

TxException

Thrown when an API error occurs

Match(ParsedResume, IEnumerable<string>, CategoryWeights, FilterCriteria, SearchMatchSettings, int)

Find matches for a non-indexed resume.

Task<MatchResponse> Match(ParsedResume resume, IEnumerable<string> indexesToQuery, CategoryWeights preferredWeights = null, FilterCriteria filters = null, SearchMatchSettings settings = null, int numResults = 0)

Parameters

resume ParsedResume

The resume (generated by the Resume Parser) to use as the source for a match query

indexesToQuery IEnumerable<string>

The indexes to find results in. These must all be of the same type (resumes or jobs)

preferredWeights CategoryWeights

The preferred category weights for scoring the results. If none are provided, The best values will be determined based on the source resume

filters FilterCriteria

Any filters to apply prior to the match (a result must satisfy all the filters)

settings SearchMatchSettings

Settings for this match

numResults int

The number of results to show. If not specified, the default will be used.

Returns

Task<MatchResponse>

Exceptions

TxException

Thrown when an API error occurs

Search(IEnumerable<string>, FilterCriteria, SearchMatchSettings, PaginationSettings)

Search for resumes or jobs that meet specific criteria

Task<SearchResponse> Search(IEnumerable<string> indexesToQuery, FilterCriteria query, SearchMatchSettings settings = null, PaginationSettings pagination = null)

Parameters

indexesToQuery IEnumerable<string>

The indexes to find results in. These must all be of the same type (resumes or jobs)

query FilterCriteria

The search query. A result must satisfy all of these criteria

settings SearchMatchSettings

The settings for this search request

pagination PaginationSettings

Pagination settings. If not specified the default will be used

Returns

Task<SearchResponse>

Exceptions

TxException

Thrown when an API error occurs

UpdateJobUserDefinedTags(string, string, IEnumerable<string>, UserDefinedTagsMethod)

Updates the user-defined tags for a job

Task<UpdateUserDefinedTagsResponse> UpdateJobUserDefinedTags(string indexId, string documentId, IEnumerable<string> userDefinedTags, UserDefinedTagsMethod method)

Parameters

indexId string

The index containing the job

documentId string

The ID of the job to update

userDefinedTags IEnumerable<string>

The user-defined tags to add/delete/etc

method UserDefinedTagsMethod

Which method to use for the specified user-defined tags

Returns

Task<UpdateUserDefinedTagsResponse>

Exceptions

TxException

Thrown when an API error occurs

UpdateResumeUserDefinedTags(string, string, IEnumerable<string>, UserDefinedTagsMethod)

Updates the user-defined tags for a resume

Task<UpdateUserDefinedTagsResponse> UpdateResumeUserDefinedTags(string indexId, string documentId, IEnumerable<string> userDefinedTags, UserDefinedTagsMethod method)

Parameters

indexId string

The index containing the resume

documentId string

The ID of the resume to update

userDefinedTags IEnumerable<string>

The user-defined tags to add/delete/etc

method UserDefinedTagsMethod

Which method to use for the specified user-defined tags

Returns

Task<UpdateUserDefinedTagsResponse>

Exceptions

TxException

Thrown when an API error occurs