1. SearchAfter API (V3)

SearchAfter API (V3) の例

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

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

次のSearchAfter要求の例は、クエリ フィルターでSearchAfter APIを使用する方法を示しています。

M.Assetクエリ

この要求は、定義名に一致するエンティティを返します。

// by definition name
// returns entities that match the definition
var filter = QueryFilterBuilder.Definition.Name == "M.Asset"

var searchAfterQuery = new SearchAfterQuery(
  filter,
  new List<Sorting>{new() { Field = "created_on", Order = QuerySortOrder.Desc }})
  {
    Take = Take,
    LoadConfiguration = new EntityLoadConfiguration
    {
      CultureLoadOption =  new CultureLoadOption(new CultureInfo("en-us")),
      PropertyLoadOption = PropertyLoadOption.All,
      RelationLoadOption = RelationLoadOption.All
    }
  };

IEntitySearchAfterResult result = await _client.Querying.SearchAfterAsync(searchAfterQuery);

フルテキスト クエリ

この要求は、テキストと完全に一致するエンティティを返します。

// full-text filter
// returns entities that match the text
var filter = QueryFilterBuilder.FullText == "A description";

エンティティ クエリ

この要求は、定義に一致するエンティティを返します。

// definition id filter
// returns entities that match the definition
var filter = QueryFilterBuilder.Definition.Id == 40;

定義とタイトルに一致するエンティティを返すエンティティ クエリ

この要求は、定義とタイトルに一致するエンティティを返します。

// logic filter
// returns entities that match the definition AND the title
var filter = QueryFilterBuilder.Definition.Name == "M.Asset" &amp;&amp; QueryFilterBuilder.String("Title") == "Brilliant";

定義と特定の関係に一致するエンティティを返すエンティティ クエリ

この要求は、定義に一致し、リレーションの特定の親を持つエンティティを返します。

// logic filter
// returns entities that match the definition AND have a specific parent for a specific relation
var filter = QueryFilterBuilder.Definition.Name == "M.Setting" &&
                QueryFilterBuilder.Parent("SettingCategoryToSettings").Id == 344;

特定のユーザーによって作成されたエンティティを返すエンティティ クエリ

この要求は、特定のユーザーによって作成されたエンティティを返します。

// created by filter
// returns entities that were created by a specific user
var filter = QueryFilterBuilder.CreatedBy == 6;

ルート分類ではないものを返すエンティティ クエリ

このリクエストは、ルートタクソノミー項目ではないエンティティを返します。

// negating filter
// returns entities that ARE NOT `is_root_taxonomy_item`
var filter = !QueryFilterBuilder.IsRootTaxonomyItem;
この記事を改善するための提案がある場合は、 お知らせください!