CLI indexコマンド

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

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

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

dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Indexing --version 4.0.0
メモ

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

使い

このコマンドは、次のように使用できます。

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

List of Indexes:
sitecore_master_index 
sitecore_core_index

dotnet sitecore index schema-populate

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

The search indexes have been populated.

Result:
sitecore_master_index [job ended]

dotnet sitecore index rebuild

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

The search indexes have been rebuilt.

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

dotnet sitecore index statistic

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
この記事を改善するための提案がある場合は、 お知らせください!