Cookie の設定を選択する

当社は、当社のサイトおよびサービスを提供するために必要な必須 Cookie および類似のツールを使用しています。当社は、パフォーマンス Cookie を使用して匿名の統計情報を収集することで、お客様が当社のサイトをどのように利用しているかを把握し、改善に役立てています。必須 Cookie は無効化できませんが、[カスタマイズ] または [拒否] をクリックしてパフォーマンス Cookie を拒否することはできます。

お客様が同意した場合、AWS および承認された第三者は、Cookie を使用して便利なサイト機能を提供したり、お客様の選択を記憶したり、関連する広告を含む関連コンテンツを表示したりします。すべての必須ではない Cookie を受け入れるか拒否するには、[受け入れる] または [拒否] をクリックしてください。より詳細な選択を行うには、[カスタマイズ] をクリックしてください。

インデックスの閲覧 - Amazon Kendra

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

インデックスの閲覧

注記

機能のサポートは、インデックスタイプと使用されている検索 API によって異なります。使用しているインデックスタイプと検索 API でこの機能がサポートされているかどうかを確認するには、「インデックスタイプ」を参照してください。

検索クエリを入力することなく、属性またはファセットでドキュメントを参照できます。 Amazon Kendra Index Browse を使用すると、ユーザーは特定のクエリに関係なく、自由にインデックスを閲覧してドキュメントを検索できます。これは、ユーザーが検索の出発点として、インデックスを幅広く閲覧するのにも役立ちます。

Index Browse は、ソートタイプを持つドキュメント属性またはファセットによる検索にのみ使用できます。Index Browse を使用して、インデックス全体を検索することはできません。クエリテキストが欠落している場合、 はドキュメント属性フィルターまたはファセット、およびソートタイプ Amazon Kendra を要求します。

クエリ API を使用してインデックスを閲覧できるようにするには、AttributeFilter またはファセットSortingConfiguration を含める必要があります。コンソールでインデックスを閲覧できるようにするには、ナビゲーションメニューの [インデックス] でインデックスを選択し、インデックスを検索するオプションを選択します。検索ボックスで、Enter キーを 2 回押します。ドロップダウンから [検索結果のフィルタリング] を選択して [フィルター] を選択し、さらにドロップダウンから [ソート] を選択してソートの種類を選択します。

次の例では、スペイン語のドキュメントのインデックスをドキュメント作成日の降順で閲覧しています。

CLI
aws kendra query \ --index-id "index-id" \ --attribute-filter '{ "EqualsTo":{ "Key": "_language_code", "Value": { "StringValue": "es" } } }' \ --sorting-configuration '{ "DocumentAttributeKey": "_created_at", "SortOrder": "DESC" }'
Python
import boto3 kendra = boto3.client("kendra") # Must include the index ID, the attribute filter, and sorting configuration response = kendra.query( IndexId = "index-id", AttributeFilter = { "EqualsTo": { "Key": "_language_code", "Value": { "StringValue": "es" } } }, SortingConfiguration = { "DocumentAttributeKey": "_created_at", "SortOrder": "DESC"}) print("\nSearch results|Resultados de la búsqueda: \n") for query_result in response["ResultItems"]: print("-------------------") print("Type: " + str(query_result["Type"])) if query_result["Type"]=="ANSWER" or query_result["Type"]=="QUESTION_ANSWER": answer_text = query_result["DocumentExcerpt"]["Text"] print(answer_text) if query_result["Type"]=="DOCUMENT": if "DocumentTitle" in query_result: document_title = query_result["DocumentTitle"]["Text"] print("Title: " + document_title) document_text = query_result["DocumentExcerpt"]["Text"] print(document_text) print("------------------\n\n")
Java
package com.amazonaws.kendra; import software.amazon.awssdk.services.kendra.KendraClient; import software.amazon.awssdk.services.kendra.model.QueryRequest; import software.amazon.awssdk.services.kendra.model.QueryResult; import software.amazon.awssdk.services.kendra.model.QueryResultItem; public class SearchIndexExample { public static void main(String[] args) { KendraClient kendra = KendraClient.builder().build(); QueryRequest queryRequest = QueryRequest.builder() .withIndexId("index-id") .withAttributeFilter(AttributeFilter.builder() .withEqualsTo(DocumentAttribute.builder() .withKey("_language_code") .withValue(DocumentAttributeValue.builder() .withStringValue("es") .build()) .build()) .build()) .withSortingConfiguration(SortingConfiguration.builder() .withDocumentAttributeKey("_created_at") .withSortOrder("DESC") .build()) .build()); QueryResult queryResult = kendra.query(queryRequest); for (QueryResultItem item : queryResult.getResultItems()) { System.out.println("----------------------"); System.out.println(String.format("Type: %s", item.getType())); switch (item.getType()) { case QueryResultType.QUESTION_ANSWER: case QueryResultType.ANSWER: String answerText = item.getDocumentExcerpt().getText(); System.out.println(answerText); break; case QueryResultType.DOCUMENT: String documentTitle = item.getDocumentTitle().getText(); System.out.println(String.format("Title: %s", documentTitle)); String documentExcerpt = item.getDocumentExcerpt().getText(); System.out.println(String.format("Excerpt: %s", documentExcerpt)); break; default: System.out.println(String.format("Unknown query result type: %s", item.getType())); } System.out.println("-----------------------\n"); } } }
aws kendra query \ --index-id "index-id" \ --attribute-filter '{ "EqualsTo":{ "Key": "_language_code", "Value": { "StringValue": "es" } } }' \ --sorting-configuration '{ "DocumentAttributeKey": "_created_at", "SortOrder": "DESC" }'
プライバシーサイト規約Cookie の設定
© 2025, Amazon Web Services, Inc. or its affiliates.All rights reserved.