Изменения документа OpenSearch for .NET

Редактировал(а) Alexandr Fokin 2023/12/17 11:29

<
От версии < 1.2 >
отредактировано Alexandr Fokin
на 2023/12/17 11:19
К версии < 1.3 >
отредактировано Alexandr Fokin
на 2023/12/17 11:22
>
Изменить комментарий: К данной версии нет комментариев

Комментарий

Подробности

Свойства страницы
Содержимое
... ... @@ -1,6 +1,24 @@
1 -|(% style="width:197px" %) |(% style="width:1257px" %).NET clients
2 -[[https:~~/~~/opensearch.org/docs/latest/clients/dot-net/>>https://opensearch.org/docs/latest/clients/dot-net/]]
3 -|(% style="width:197px" %) |(% style="width:1257px" %)[[Open Search>>doc:Разработка.Базы данных.NoSQL.Документоориентированная структура.Open Search.WebHome]]
4 -|(% style="width:197px" %) |(% style="width:1257px" %)
1 +|(% style="width:197px" %) |(% style="width:1144px" %).NET clients
2 +[[https:~~/~~/opensearch.org/docs/latest/clients/dot-net/>>https://opensearch.org/docs/latest/clients/dot-net/]]|(% style="width:250px" %)
3 +|(% style="width:197px" %) |(% style="width:1144px" %)[[Open Search>>doc:Разработка.Базы данных.NoSQL.Документоориентированная структура.Open Search.WebHome]]|(% style="width:250px" %)
4 +|(% style="width:197px" %) |(% style="width:1144px" %) |(% style="width:250px" %)
5 +|(% style="width:197px" %) |(% style="width:1144px" %){{code language="c#"}}var node = new Uri("https://<ip>:<port>");
6 +var config = new ConnectionSettings(node)
7 + .BasicAuthentication("admin", "admin")
8 + .DefaultIndex("students")
9 + .ServerCertificateValidationCallback(
10 + (p1, p2, p3, p4) =>
11 + {
12 + return true;
13 + }
14 + )
15 + .ThrowExceptions(true);
5 5  
17 +var client = new OpenSearchClient(config);
18 +
19 +var student = new Student(100, "Paulo", "Santos", 3.93, 2021);
20 +
21 +var response = client.Index(student, i => i.Index("students"));{{/code}}|(% style="width:250px" %)Пример минимального подключения.
22 +\\Замечание1: при локальном развертывании не подключался через localhost, только через ip машины.
23 +
6 6