Python 2.7 はサポートが終了しており、2026 年 1 月 31 日に
非推奨になります。非推奨になると、過去に組織のポリシーを使用して以前のランタイムのデプロイを再度有効にしていた場合でも、Python 2.7 アプリケーションをデプロイできなくなります。既存の Python 2.7 アプリケーションは、
非推奨日以降も引き続き実行され、トラフィックを受信します。
サポートされている最新バージョンの Python に移行することをおすすめします。
Python 2 開発サーバーの使用
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Python 2 開発用サーバーはローカルマシンで実行され、Search API のほとんどの機能をエミュレートします。
いくつかの機能はこのサーバーでは利用できません。開発用サーバーで実行する際には以下の機能を使用しないでください。
式の関数
次の関数は使用できません。
ステミング
フィールド値のステミング("~cat" など)は実装されていません。ステミング演算子は無視され、値は通常の完全一致として扱われます。
トークン化
アジア圏の諸言語の文字列フィールドは、開発用サーバーではトークン化されません。
Snippet() 式
開発用サーバーはスニペットをサポートしていますが、スニペットの選択と書式設定のアルゴリズムは、デプロイされたアプリで使用されるアルゴリズムとは異なります。2 つの環境で、スニペットの結果は完全には一致しません。
スコア付け
一致スコア付けのメカニズムは実装されていません。
発音区別符号
発音区別符号(アクセント記号など)を atom、text、HTML フィールドに使用することはできません。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は 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\u003eThis API is supported for first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes, with a migration guide available for those moving to the App Engine Python 3 runtime.\u003c/p\u003e\n"],["\u003cp\u003eThe Python 2 development server emulates most of the Search API's capabilities on your local machine.\u003c/p\u003e\n"],["\u003cp\u003eSeveral features are unavailable on the development server, including \u003ccode\u003epow()\u003c/code\u003e, stemming, tokenization of Asian languages, scoring, and the use of diacritical marks.\u003c/p\u003e\n"],["\u003cp\u003eSnippet functionality is supported on the development server, but its algorithms differ from those used in a deployed app, resulting in potentially different snippet outputs.\u003c/p\u003e\n"]]],[],null,["# Using the Python 2 Development Server\n\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\nThe Python 2 development server runs on your local machine and emulates\nmost of the Search API's capabilities.\n\nA few features are not available on the server. You should not attempt to\nuse the following features when you run on the development server:\n\n### Functions in expressions\n\nThese functions are not available:\n\n- `pow()`\n\n### Stemming\n\nStemming of field values (for example \"\\~cat\") is not implemented. The\nstem operator will be ignored and the value will be treated as an ordinary\nexact match.\n\n### Tokenization\n\nString fields in Asian languages are not tokenized on the development server.\n\n### Snippet() Expressions\n\nThe development server supports snippets, but the snippet selection and\nformatting algorithms are not the same as those used in a deployed app.\nSnippet results will not be exactly the same in the two environments.\n\n### Scoring\n\nThe match scoring mechanism is not implemented.\n\n### Diacriticals\n\nDiacritical marks (such as accent marks) cannot be used in atom, text, and HTML fields."]]