속성 클래스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
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-04-03(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-04-03(UTC)"],[[["The `Facet` class is an abstract base class for representing document facets and should not be directly instantiated."],["`Facet` objects have properties for a `name`, which must follow a specific format and length restriction, and a `value`, which can be a string, unicode, or number."],["`AtomFacet` is a subclass of `Facet` 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."],["`NumberFacet` is another subclass of `Facet` where the value is numeric, with errors raised if a non-numeric value is provided or if the value is out of range."],["The `Facet` 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."]]],[]]