Python 2.7은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Python 2.7 애플리케이션을 배포할 수 없습니다. 기존 Python 2.7 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Python 버전으로 마이그레이션하는 것이 좋습니다.
속성 클래스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Facet
클래스는 문서 속성을 나타내는 추상 기본 클래스입니다. 이 클래스를 직접 인스턴스화할 수 없습니다.
Facet
은 모듈 google.appengine.api.search
에 정의됩니다.
속성
Facet
클래스의 인스턴스에는 다음 속성이 있습니다.
- name
속성 이름입니다. 속성 이름은 MAXIMUM_FIELD_NAME_LENGTH의 최대 길이여야 하고 '[A-Za-z][A-Za-z0-9_]*' 패턴과 일치해야 합니다.
- value
속성 값이며 문자열, 유니코드 또는 숫자일 수 있습니다.
서브클래스
Facet
클래스에는 다음 서브클래스가 있습니다.
-
class AtomFacet
색인 생성을 위한 단일 토큰으로 취급될 콘텐츠가 있는 속성입니다.
속성 값은 분할될 수 없는 텍스트 값으로 취급되는 문자열 또는 유니코드 객체입니다. 다음 예는 wine_type이라는 원자 속성을 보여 줍니다.
AtomFacet(name='wine_type', value='Red')
-
예외
- TypeError
제공된 값이 텍스트 문자열이 아닙니다.
- ValueError
값이 최대 허용 길이를 초과합니다.
-
class NumberFacet
숫자 값을 가진 속성입니다.
다음 예는 wine_vintage라는 숫자 속성을 보여 줍니다.
NumberFacet(name='wine_vintage', value=2000)
-
예외
- TypeError
제공된 값이 숫자가 아닙니다.
- ValueError
값이 범위를 벗어났습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","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-04(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eFacet\u003c/code\u003e class is an abstract base class for representing document facets and should not be directly instantiated.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFacet\u003c/code\u003e objects have properties for a \u003ccode\u003ename\u003c/code\u003e, which must follow a specific format and length restriction, and a \u003ccode\u003evalue\u003c/code\u003e, which can be a string, unicode, or number.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAtomFacet\u003c/code\u003e is a subclass of \u003ccode\u003eFacet\u003c/code\u003e where the value is treated as a single text token, and errors are raised if the value is not a text string or exceeds the maximum length.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eNumberFacet\u003c/code\u003e is another subclass of \u003ccode\u003eFacet\u003c/code\u003e where the value is numeric, with errors raised if a non-numeric value is provided or if the value is out of range.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFacet\u003c/code\u003e API is supported for first-generation runtimes and has considerations when upgrading to the second-generation App Engine Python 3 runtime, outlined in a migration guide.\u003c/p\u003e\n"]]],[],null,["# Facet Classes\n\nClass `Facet` is an abstract base class representing a facet of a document. This class should not be directly instantiated.\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| python3\n|\n| /services/access). If you are updating to the App Engine Python 3 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/python-differences) to learn about your migration options for legacy bundled services.\n\n`Facet` is defined in the module `google.appengine.api.search`.\n\nProperties\n----------\n\nAn instance of class `Facet` has the following properties:\n\nname\n\n: The name of the facet. Facet\n names must have maximum length MAXIMUM_FIELD_NAME_LENGTH and match pattern \"\\[A-Za-z\\]\\[A-Za-\n z0-9_\\]\\*\".\n\nvalue\n\n: The value of the facet which can be a str, unicode or number.\n\nSubclasses\n----------\n\nClass `Facet` has the following subclasses:\n\n\nclass AtomFacet\n\n: A Facet that has content to be treated as a single token for indexing.\n\n The facet's value is a str or unicode object to be treated as an indivisible text value. The following example shows an atom facet named wine_type: \n\n ```\n AtomFacet(name='wine_type', value='Red')\n ```\n\n: Exceptions\n\n TypeError\n\n : Value supplied is not a text string.\n\n ValueError\n\n : Value exceeds maximum allowable length.\n\n\nclass NumberFacet\n\n: A Facet that has a numeric value.\n\n The following example shows a number facet named wine_vintage: \n\n ```\n NumberFacet(name='wine_vintage', value=2000)\n ```\n\n: Exceptions\n\n TypeError\n\n : Value supplied is not numeric.\n\n ValueError\n\n : Value is out of range."]]