ORDER_BY: 결과가 정렬되는 순서입니다. 예를 들어 시간순으로 정렬하려면 date을 지정하여 Google에서 추론한 페이지 날짜순으로 정렬된 웹페이지를 반환합니다. Google에서 추론한 페이지 날짜에 관한 자세한 내용은 웹페이지에 가장 적합한 날짜를 Google 검색에 알려주세요 블로그 게시물을 참고하세요.
기본 정렬 순서는 내림차순이며, 이 경우 가장 최근 날짜의 페이지가 먼저 반환됩니다. 오름차순 정렬 순서로 가져오려면 date 값에 :a를 추가합니다(date:a).
고급 웹사이트 색인 생성의 검색 결과 정렬
고급 웹사이트 색인 생성을 사용하여 웹사이트 데이터 스토어의 검색 결과를 정렬하려면 다음 단계를 따르세요.
ORDER_BY: 결과가 정렬되는 순서입니다. 필드는 datetime, integer 또는 number 데이터 유형의 값을 가질 수 있습니다. 시간순으로 정렬하려면 스키마에 지정된 커스텀 날짜 속성 또는 Google에서 추론한 페이지 날짜를 지정하여 날짜순으로 정렬된 웹페이지를 반환합니다. 예를 들어 date_edited PageMap 속성으로 정렬하려면 orderBy 필드를 "orderBy": "date_edited"로 지정하면 됩니다. 기본 정렬 순서는 오름차순이며, 이 경우 오래된 페이지가 먼저 반환됩니다. 결과를 내림차순으로 가져오려면 커스텀 속성 값에 desc를 추가합니다(예: "orderBy":"date_edited desc").
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[[["\u003cp\u003eThis guide demonstrates how to order web search results by date for both basic and advanced website search configurations.\u003c/p\u003e\n"],["\u003cp\u003eFor basic website search, results can be sorted by Google-inferred page dates using the \u003ccode\u003eorderBy\u003c/code\u003e field set to \u003ccode\u003edate\u003c/code\u003e in the search query.\u003c/p\u003e\n"],["\u003cp\u003eAdvanced website indexing allows sorting by either Google-inferred page dates or custom data attributes defined in the data store schema.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eengines.servingConfigs.search\u003c/code\u003e method is the recommended approach for searching and ordering results for both basic and advanced configurations.\u003c/p\u003e\n"],["\u003cp\u003eWhen sorting, the default is descending order for basic web searches, and ascending order for advanced web searches, but this can be reversed by appending \u003ccode\u003e:a\u003c/code\u003e or \u003ccode\u003edesc\u003c/code\u003e, respectively, to the ordering value.\u003c/p\u003e\n"]]],[],null,["# Order web search results\n\nThis page explains how to order the results of a web search query by date.\n\n- For data stores that use basic website search, you can order by Google-inferred page dates.\n- For data stores that use advanced website indexing, you can order by custom data attributes or Google-inferred page dates that are added to the data store schema. For more information, see [Use structured data for advanced website indexing](/generative-ai-app-builder/docs/add-website-metadata).\n\nBefore you begin\n----------------\n\nMake sure that you do the following:\n\n- Create a data store with website data. For more information, see [Website\n URLs](/generative-ai-app-builder/docs/create-data-store-es#website).\n\n- Create a search app and connect it to the data store. For more information,\n see [Create a search app](/generative-ai-app-builder/docs/create-engine-es).\n\nOrder search results for basic website search\n---------------------------------------------\n\nTo order the search results for a website data store with\nbasic website search, follow these steps: \n\n### REST\n\nThe following sample shows how to to order your web search results for an app\nwith basic website search. This sample uses the\n[`engines.servingConfigs.search`](/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search) method:\n| **Note:** You can search over an app using the [`engines.servingConfigs.search`](/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search) method and you can search over a data store using the [`dataStores.servingConfigs.search`](/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores.servingConfigs/search) method. For the following procedure, Google recommends searching using the `engines.servingConfigs.search` method.\n\n1. Find your app ID. If you already have your app ID, skip to the next step.\n\n 1. In the Google Cloud console, go to the **AI Applications** page.\n\n [Go to Apps](https://console.cloud.google.com/gen-app-builder/engines)\n 2. On the **Apps** page, find the name of your app and get the app's ID from\n the **ID** column.\n\n2. Make a search query and include the `orderBy` field.\n\n **Key Term:** In Vertex AI Search, the term *app* can be used interchangeably with the term *engine* in the context of APIs. \n\n curl -X POST -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json\" \\\n \"https://discoveryengine.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/global/collections/default_collection/engines/\u003cvar translate=\"no\"\u003eAPP_ID\u003c/var\u003e/servingConfigs/default_search:search\" \\\n -d '{\n \"servingConfig\": \"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/global/collections/default_collection/engines/\u003cvar translate=\"no\"\u003eAPP_ID\u003c/var\u003e/servingConfigs/default_search\",\n \"query\": \"\u003cvar translate=\"no\"\u003eQUERY\u003c/var\u003e\",\n \"orderBy\": \"\u003cvar translate=\"no\"\u003eORDER_BY\u003c/var\u003e\"\n }'\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project.\n - \u003cvar translate=\"no\"\u003eAPP_ID\u003c/var\u003e: the ID of the Vertex AI Search app.\n - \u003cvar translate=\"no\"\u003eQUERY\u003c/var\u003e: the query text to search.\n - \u003cvar translate=\"no\"\u003eORDER_BY\u003c/var\u003e: the order in which the results are arranged. For example, to order chronologically, specify `date` to return web pages sorted by Google-inferred page date. For more information on the Google-inferred page date, see the [Help Google Search know the best date for your web page](https://developers.google.com/search/blog/2019/03/help-google-search-know-best-date-for) blog post. The default sort order is descending, in which the pages with the most recent dates are returned first. To get ascending sort order, append `:a` to the `date` value---`date:a`.\n\n\u003cbr /\u003e\n\nOrder search results for advanced website indexing\n--------------------------------------------------\n\nTo order the search results for a website data store with\nadvanced website indexing, follow these steps: \n\n### REST\n\nThe following sample shows how to order your web search results for an app\nwith advanced website indexing. This sample uses the\n[`engines.servingConfigs.search`](/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search) method:\n| **Note:** You can search over an app using the [`engines.servingConfigs.search`](/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search) method and you can search over a data store using the [`dataStores.servingConfigs.search`](/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores.servingConfigs/search) method. For the following procedure, Google recommends searching using the `engines.servingConfigs.search` method.\n\n1. Find your app ID. If you already have your app ID, skip to the next step.\n\n 1. In the Google Cloud console, go to the **AI Applications** page.\n\n [Go to Apps](https://console.cloud.google.com/gen-app-builder/engines)\n 2. On the **Apps** page, find the name of your app and get the app's ID from\n the **ID** column.\n\n2. Make a search query and include the `orderBy` field.\n\n **Key Term:** In Vertex AI Search, the term *app* can be used interchangeably with the term *engine* in the context of APIs. \n\n curl -X POST -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json\" \\\n \"https://discoveryengine.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/global/collections/default_collection/engines/\u003cvar translate=\"no\"\u003eAPP_ID\u003c/var\u003e/servingConfigs/default_search:search\" \\\n -d '{\n \"servingConfig\": \"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/global/collections/default_collection/engines/\u003cvar translate=\"no\"\u003eAPP_ID\u003c/var\u003e/servingConfigs/default_search\",\n \"query\": \"\u003cvar translate=\"no\"\u003eQUERY\u003c/var\u003e\",\n \"orderBy\": \"\u003cvar translate=\"no\"\u003eORDER_BY\u003c/var\u003e\"\n }'\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project.\n - \u003cvar translate=\"no\"\u003eAPP_ID\u003c/var\u003e: the ID of the Vertex AI Search app.\n - \u003cvar translate=\"no\"\u003eQUERY\u003c/var\u003e: the query text to search.\n - \u003cvar translate=\"no\"\u003eORDER_BY\u003c/var\u003e: the order in which the results are arranged. The field can have values that are of the following data types: datetime, integer, or number. To order chronologically, specify the custom date attribute specified in the schema or the Google-inferred page date to return web pages sorted by date. For example, to order by a `date_edited` PageMap attribute, you can specify the `orderBy` field as `\"orderBy\": \"date_edited\"`. The default sort order is ascending, in which older pages are returned first. To get the results in descending order, append `desc` to the custom attribute value---for example, `\"orderBy\":\"date_edited desc\"`.\n\n\u003cbr /\u003e"]]