ASP.NETを使用してプロジェクト管理サービスを開発しています。このサービスは、会話、ファイル、やることリスト、およびユーザーがいつでも対話できるカレンダーをホストします。
このアプリケーションはAzure Searchを使用して、ユーザーがプロジェクトデータ内のキーワードを検索できるようにします。
Azure Searchサービスでインデックスを作成するために使用されるオブジェクトを作成するコードを実装する必要があります。
どちらのオブジェクトを使うべきですか?それぞれの正しい答えは解決策の一部を表しています。
注:それぞれ正しい選択は1ポイントの価値があります。
正解:B,C
The various client libraries define classes like Index, Field, and Document, as well as operations like Indexes.Create and Documents.Search on the SearchServiceClient and SearchIndexClient classes.
Example:
The sample application we'll be exploring creates a new index named "hotels", populates it with a few documents, then executes some search queries. Here is the main program, showing the overall flow:
/ This sample shows how to delete, create, upload documents and query an index static void Main(string[] args)
{
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json"); IConfigurationRoot configuration = builder.Build(); SearchServiceClient serviceClient = CreateSearchServiceClient(configuration); Console.WriteLine("{0}", "Deleting index...\n"); DeleteHotelsIndexIfExists(serviceClient); Console.WriteLine("{0}", "Creating index...\n"); CreateHotelsIndex(serviceClient); ISearchIndexClient indexClient = serviceClient.Indexes.GetClient("hotels"); References:
https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk