SearchResults 클래스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
SearchResults
클래스는 Index.search()
를 사용하여 검색 요청 실행 결과를 제공합니다.
SearchResults
은 google.appengine.api.search
모듈에 정의됩니다.
생성자
SearchResults
클래스의 생성자는 다음과 같이 정의됩니다.
-
class SearchResults(number_found, results=None, cursor=None)
해당 쿼리의 매개변수를 지정하여 검색 서비스가 색인을 쿼리하도록 요청합니다.
인수
- number_found
쿼리로 찾은 문서 수입니다.
- 결과
검색 요청을 실행하여 반환된 ScoredDocument 객체 목록입니다.
- cursor
현재 검색 결과의 끝에서 계속 검색을 수행할 수 있게 해주는 Cursor 객체입니다.
결과 값
Index.search() 실행 결과를 나타내는 SearchRequest
클래스의 새 인스턴스입니다.
예외
- TypeError
매개변수에 잘못된 유형이 있거나 알 수 없는 속성이 전달된 경우 발생합니다.
- ValueError
매개변수에 잘못된 값이 있는 경우 발생합니다.
속성
SearchResults
클래스의 인스턴스에는 다음 속성이 있습니다.
- 결과
쿼리와 일치하는 ScoredDocument 객체 목록을 반환합니다.
- number_found
쿼리와 일치하는 대략적인 문서 개수를 반환합니다. QueryOptions
는 검색 결과의 후처리를 정의합니다. QueryOptions.number_found_accuracy
매개변수가 100으로 설정된 경우 100보다 작거나 같은 number_found
가 정확합니다.
- cursor
- 이 필드를 채우려면 검색의 QueryOptions에 커서를 전달해야 합니다. 그렇지 않으면 None이 됩니다. 마지막 결과에서 검색을 계속하기 위해 사용할 수 있는 결과 Cursor를 반환합니다. 현재 결과 이후 추가 결과가 없으면 None이 반환됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-03-06(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-03-06(UTC)"],[[["`SearchResults` represents the outcome of a search request made using `Index.search()` and is found within the `google.appengine.api.search` module."],["The `SearchResults` constructor takes parameters such as `number_found`, `results` (a list of `ScoredDocument` objects), and `cursor` to manage search results and pagination."],["The `results` property of `SearchResults` provides a list of `ScoredDocument` objects that match the search query."],["The `number_found` property offers an approximate count of documents that match the query, with accuracy influenced by the `QueryOptions.number_found_accuracy` parameter."],["The `cursor` property can be used to continue a search from where the last result left off if a cursor is included in the search's `QueryOptions`, otherwise it will be None."]]],[]]