arazzo: 1.0.1
info:
title: Affinda Create Search Index and Add a Document
summary: Create a Search & Match index, add a document to it, then list the index's documents.
description: >-
Builds a searchable index for the Search & Match product. A new index is
created for a document type, an existing parsed document is added to it, and
the index's documents are listed to confirm the document was indexed. Every
step spells out its request inline so the flow can be read and executed without
opening the underlying OpenAPI description.
version: 1.0.0
x-realizes-capability-ids:
- BC-300.10
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-300.10
capability_name: Talent Acquisition Management
spec: affinda-search-match-api-openapi.yml
confidence: 0.8
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: searchMatchApi
url: ../openapi/affinda-search-match-api-openapi.yml
type: openapi
workflows:
- workflowId: create-index-and-add-document
summary: Create an index, add a document, then list the index's documents.
description: >-
Creates a named index, indexes the supplied document into it, and lists the
index documents to confirm.
inputs:
type: object
required:
- name
- document
properties:
name:
type: string
description: The unique name for the new index.
docType:
type: string
description: The document type for the index (e.g. resumes or job_descriptions).
document:
type: string
description: The identifier of the parsed document to add to the index.
steps:
- stepId: createIndex
description: Create a new Search & Match index.
operationId: createIndex
requestBody:
contentType: application/json
payload:
name: $inputs.name
docType: $inputs.docType
successCriteria:
- condition: $statusCode == 201
outputs:
indexName: $response.body#/name
- stepId: addDocument
description: Index the supplied document into the new index.
operationId: createIndexDocument
parameters:
- name: name
in: path
value: $steps.createIndex.outputs.indexName
requestBody:
contentType: application/json
payload:
document: $inputs.document
successCriteria:
- condition: $statusCode == 201
outputs:
document: $response.body#/document
- stepId: listIndexDocuments
description: List the documents in the index to confirm the document was added.
operationId: getAllIndexDocuments
parameters:
- name: name
in: path
value: $steps.createIndex.outputs.indexName
successCriteria:
- condition: $statusCode == 200
outputs:
count: $response.body#/count
outputs:
indexName: $steps.createIndex.outputs.indexName
indexedDocument: $steps.addDocument.outputs.document
count: $steps.listIndexDocuments.outputs.count
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.