Table of Contents

Interface IAzureAISearchService

Namespace
FoundationaLLM.Common.Interfaces
Assembly
FoundationaLLM.Common.dll

Interface for Azure AI Search Service.

public interface IAzureAISearchService
Extension Methods

Methods

CreateIndexIfNotExists(string, IEnumerable<SearchField>, VectorSearch?)

Creates an index in the Azure AI Search service if it does not already exist.

Task CreateIndexIfNotExists(string indexName, IEnumerable<SearchField> indexFields, VectorSearch? indexConfiguration = null)

Parameters

indexName string

The name of the index to create.

indexFields IEnumerable<SearchField>

The list of fields for the newly created index.

indexConfiguration VectorSearch

The optionsl vectorization configuration for the newly created index.

Returns

Task

UploadDocuments(string, List<string>, List<object[]>)

Uploads documents to the specified index in the Azure AI Search service.

Task UploadDocuments(string indexName, List<string> fieldNames, List<object[]> fieldValues)

Parameters

indexName string

The name of the index in which the documents should be uploaded.

fieldNames List<string>

The names of the fields of the documents.

fieldValues List<object[]>

The values of the fields of the documents.

Returns

Task