CLI index コマンド

Version: 10.2
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Sitecore インデックス作成プラグインには、index コマンドが含まれています。このコマンドは、インデックス作成操作を自動化します。インデックス作成プラグインをインストールするには、次のコードを実行します。

RequestResponse
dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Indexing --version 4.0.0
注記

このコマンドは、CLI 4.0 以降から使用できます。

使用方法

次のコマンドを使用できます。

RequestResponse
dotnet sitecore index [subcommand] [options]

サブコマンド

次のサブコマンドを使用できます。

サブコマンド

説明

list

環境から利用可能なインデックスのリストを提供します

schema-populate

管理スキーマを生成します

rebuild

すべてのインデックスを再構築します

statistic

すべてのインデックスの統計

オプション

list サブコマンドでは、次のオプションを使用できます。

オプション

必須?

説明

-n, --environment-name <environment-name>

オプション

使用する Sitecore 環境。デフォルト: default

-c, --config <CONFIG>

オプション

ルート sitecore.config ディレクトリへのパス (デフォルト: cwd)。

-v, --verbose

オプション

追加の診断およびパフォーマンス データを報告します。

-t, --trace

オプション

追加の診断およびパフォーマンス データを報告します。

-?, -h, --help

オプション

コマンドのヘルプ。

schema-populate サブコマンドでは、次のオプションを使用できます。

オプション

必須?

説明

-i, --indexes <list-of-indexes>

オプション

指定されたインデックスのスキーマにデータを入力します。

-n, --environment-name <environment-name>

オプション

使用する Sitecore 環境。デフォルト: default

-c, --config <CONFIG>

オプション

ルート sitecore.config ディレクトリへのパス (デフォルト: cwd)。

-v, --verbose

オプション

追加の診断およびパフォーマンス データを報告します。

-t, --trace

オプション

追加の診断およびパフォーマンス データを報告します。

-?, -h, --help

オプション

コマンドのヘルプ。

rebuild サブコマンドでは、次のオプションを使用できます。

オプション

必須?

説明

-i, --indexes <list-of-indexes>

オプション

指定されたインデックスを再構築します。

-n, --environment-name <environment-name>

オプション

使用する Sitecore 環境。デフォルト: default

-c, --config <CONFIG>

オプション

ルート sitecore.config ディレクトリへのパス (デフォルト: cwd)。

-v, --verbose

オプション

追加の診断およびパフォーマンス データを報告します。

-t, --trace

オプション

追加の診断およびパフォーマンス データを報告します。

-?, -h, --help

オプション

コマンドのヘルプ。

statistic サブコマンドでは、次のオプションを使用できます。

オプション

必須?

説明

-n, --environment-name <environment-name>

オプション

使用する Sitecore 環境。デフォルト: default

-c, --config <CONFIG>

オプション

ルート sitecore.config ディレクトリへのパス (デフォルト: cwd)。

-t, --trace

オプション

追加の診断およびパフォーマンス データを報告します。

-?, -h, --help

オプション

コマンドのヘルプ。

index コマンドの使用例は、次のとおりです。

コマンド

結果

dotnet sitecore index list

RequestResponse
List of Indexes:
sitecore_master_index 
sitecore_core_index

dotnet sitecore index schema-populate

RequestResponse
The search indexes have been populated.

Result:
sitecore_core_index   [job ended] 
sitecore_master_index [job ended] 
sitecore_web_index    [job ended]

dotnet sitecore index schema-populate -i sitecore_master_index

RequestResponse
The search indexes have been populated.

Result:
sitecore_master_index [job ended]

dotnet sitecore index rebuild

RequestResponse
The search indexes have been rebuilt.

Result:
sitecore_core_index   [job ended] [units processsed: 13596]
sitecore_master_index [job ended] [units processsed: 16620]
sitecore_web_index    [job ended] [units processsed: 13596]

dotnet sitecore index rebuild -i sitecore_master_index

RequestResponse
The search indexes have been rebuilt.

Result:
sitecore_master_index [job ended] [units processsed: 16620]

dotnet sitecore index statistic

RequestResponse
Index statistics:
 sitecore_core_index
  Rebuild Time: Never Run
  Last Updated: 08/13/2021 - 08:45 (UTC)
  Approximate Throughput: items per second
  Has Deletions: False
  Out of Date: False
  Document Count: 0
  Number of Fields: -1
  Number of Terms: -1

何かフィードバックはありますか?

この記事を改善するための提案がある場合は、