describeSearchScopeOrder()
ユーザのデフォルトのグローバル検索範囲内にあるオブジェクトの順序付きリストを取得します。
構文
1DescribeSearchScopeOrderResult[] describeSearchScopeOrderResults = connection.describeSearchScopeOrder();使用方法
ログインユーザのデフォルトのグローバル検索範囲内にあるオブジェクトの順序付きリストを取得するには、describeSearchScopeOrder() を使用します。グローバル検索は、操作するオブジェクトとそれらを操作する頻度を追跡し、それに基づいて検索結果を編成します。最もよく使用されるオブジェクトは、リストの最上部に表示されます。返されるリストには、ユーザの検索結果ページの固定表示オブジェクトを含め、ユーザのデフォルトの検索範囲でのオブジェクト順が反映されます。このコールは、最適化されたグローバル検索範囲を使用してカスタム検索結果ページを実装する場合に役立ちます。
サンプルコード — Java
このサンプルでは、ユーザのグローバル検索範囲を取得して、その範囲内の各オブジェクトの名前を反復的に表示する方法を示します。
1public void describeSearchScopeOrderSample() {
2 try {
3 //Get the order of objects in search smart scope for the logged-in user
4 DescribeSearchScopeOrderResult[] describeSearchScopeOrderResults =
5 connection.describeSearchScopeOrder();
6 //Iterate through the results and display the name of each object
7 for (int i = 0; i < describeSearchScopeOrderResults.length; i++) {
8 System.out.println(describeSearchScopeOrderResults[i].getName());
9 }
10 }
11 catch(ConnectionException ce) {
12 ce.printStackTrace();
13 }
14}引数
なし。
応答
DescribeSearchScopeOrderResult オブジェクトの配列