Python 2.7 has reached end of supportand will bedeprecatedon January 31, 2026. After deprecation, you won't be able to deploy Python 2.7applications, even if your organization previously used an organization policy tore-enable deployments of legacy runtimes. Your existing Python2.7 applications will continue to run and receive traffic after theirdeprecation date. We recommend thatyoumigrate to the latest supported version of Python.

The GetResponse Class

ClassGetResponse representsthe results of methods invoked to return information about documents and indexes.

This API is supported for first-generation runtimes and can be used whenupgrading to corresponding second-generation runtimes. If you are updating to the App Engine Python 3 runtime, refer to themigration guide to learn about your migration options for legacy bundled services.

GetResponse is defined in the modulegoogle.appengine.api.search.

Introduction

AGetResponse object is returned from a call to eitherindex.get_range()orsearch.get_indexes().You can iterate over an instance ofGetResponse, which will return the members of itsresults property. The contents of the propertyare determined by the type of call that created the instance ofGetResponse.

For example, the following code shows howGetResponse could be used todetermine which documents were successfully deleted. In this casethe iteration returnsDocuments.

response=index.get_range()fordocumentinresponse:print"document ",document

Constructor

The constructor for classGetResponse is defined as follows:

class GetResponse(results=None)

Construct an instance of classGetResponse.

Argument

results

Initial value of itsresults property.

Result value

A new instance of classGetResponse.

Exceptions

TypeError

A parameter has an invalid type, or an unknown attribute was passed.

ValueError

A parameter has an invalid value.

Properties

An instance of classGetResponse has the following property:

results

A list of results, whose type depends on the call that returns the object. If returning from a call toget_range(),results is a list ofDocuments in descending order of their identifiers. If returning from a call tosearch.get_indexes(),results is a list ofIndexes.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.