You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Elastic.SemanticKernel.Connectors.Elasticsearch/ElasticsearchKernelBuilderExtensions.cs
+50-4Lines changed: 50 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -31,16 +31,62 @@ public static IKernelBuilder AddElasticsearchVectorStore(this IKernelBuilder bui
31
31
}
32
32
33
33
/// <summary>
34
-
/// Register an Elasticsearch <see cref="IVectorStore"/> with the specified service ID and where <see cref="ElasticsearchClient"/> is constructed using the provided settings.
34
+
/// Register an Elasticsearch <see cref="IVectorStore"/> with the specified service ID and where <see cref="ElasticsearchClient"/> is constructed using the provided client settings.
35
35
/// </summary>
36
36
/// <param name="builder">The builder to register the <see cref="IVectorStore"/> on.</param>
/// Register an Elasticsearch <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> and <see cref="IVectorizedSearch{TRecord}"/> with the specified service ID
49
+
/// and where the <see cref="ElasticsearchClient"/> is retrieved from the dependency injection container.
50
+
/// </summary>
51
+
/// <typeparam name="TKey">The type of the key.</typeparam>
52
+
/// <typeparam name="TRecord">The type of the record.</typeparam>
53
+
/// <param name="builder">The builder to register the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> on.</param>
54
+
/// <param name="collectionName">The name of the collection.</param>
55
+
/// <param name="options">Optional options to further configure the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/>.</param>
56
+
/// <param name="serviceId">An optional service id to use as the service key.</param>
/// Register an Elasticsearch <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> and <see cref="IVectorizedSearch{TRecord}"/> with the specified service ID
71
+
/// and where the <see cref="ElasticsearchClient"/> is constructed using the provided client settings.
72
+
/// </summary>
73
+
/// <typeparam name="TKey">The type of the key.</typeparam>
74
+
/// <typeparam name="TRecord">The type of the record.</typeparam>
75
+
/// <param name="builder">The builder to register the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> on.</param>
76
+
/// <param name="collectionName">The name of the collection.</param>
@@ -43,20 +43,20 @@ public static IServiceCollection AddElasticsearchVectorStore(this IServiceCollec
43
43
}
44
44
45
45
/// <summary>
46
-
/// Register an Elasticsearch <see cref="IVectorStore"/> with the specified service ID and where <see cref="ElasticsearchClient"/> is constructed using the provided settings.
46
+
/// Register an Elasticsearch <see cref="IVectorStore"/> with the specified service ID and where <see cref="ElasticsearchClient"/> is constructed using the provided client settings.
47
47
/// </summary>
48
48
/// <param name="services">The <see cref="IServiceCollection"/> to register the <see cref="IVectorStore"/> on.</param>
@@ -66,4 +66,90 @@ public static IServiceCollection AddElasticsearchVectorStore(this IServiceCollec
66
66
67
67
returnservices;
68
68
}
69
+
70
+
/// <summary>
71
+
/// Register an Elasticsearch <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> and <see cref="IVectorizedSearch{TRecord}"/> with the specified service ID
72
+
/// and where the <see cref="ElasticsearchClient"/> is retrieved from the dependency injection container.
73
+
/// </summary>
74
+
/// <typeparam name="TKey">The type of the key.</typeparam>
75
+
/// <typeparam name="TRecord">The type of the record.</typeparam>
76
+
/// <param name="services">The <see cref="IServiceCollection"/> to register the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> on.</param>
77
+
/// <param name="collectionName">The name of the collection.</param>
78
+
/// <param name="options">Optional options to further configure the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/>.</param>
79
+
/// <param name="serviceId">An optional service id to use as the service key.</param>
/// Register an Elasticsearch <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> and <see cref="IVectorizedSearch{TRecord}"/> with the specified service ID
105
+
/// and where the <see cref="ElasticsearchClient"/> is constructed using the provided client settings.
106
+
/// </summary>
107
+
/// <typeparam name="TKey">The type of the key.</typeparam>
108
+
/// <typeparam name="TRecord">The type of the record.</typeparam>
109
+
/// <param name="services">The <see cref="IServiceCollection"/> to register the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> on.</param>
110
+
/// <param name="collectionName">The name of the collection.</param>
/// Also register the <see cref="IVectorStoreRecordCollection{TKey, TRecord}"/> with the given <paramref name="serviceId"/> as a <see cref="IVectorizedSearch{TRecord}"/>.
140
+
/// </summary>
141
+
/// <typeparam name="TKey">The type of the key.</typeparam>
142
+
/// <typeparam name="TRecord">The type of the data model that the collection should contain.</typeparam>
143
+
/// <param name="services">The service collection to register on.</param>
144
+
/// <param name="serviceId">The service id that the registrations should use.</param>
0 commit comments