LoginSignup
4
3

More than 5 years have passed since last update.

GAE/Jで「The index for this query is not ready to serve.」がいつまでたっても消えない

Posted at

GAEで作ったJSPをデプロイしていざ実行しようとしたらデータの追加はできるが、条件検索をすると以下の様なエラーが出てしまった。

The index for this query is not ready to serve.

どうもデータストアのIndex生成が上手くいっていないようだ。解決策をググると以下のページに行き当たった。このページでは数時間待てば解消するとあるので待ってみる。

"The index for this query is not ready to serve." というエラーが出た場合の対処方法

・・・・が、ダメ・・・orz

ちっとも解決しない。どうやら自前でdatastore-indexes.xmlなるものを作成したほうが良さそうなので作ってみた。

WEB-INF/datastore-indexes.xml
<datastore-indexes autoGenerate="true">
   <datastore-index kind="Entity名" ancestor="false" source="manual">
        <property name="プロパティ名" direction="asc"/>
        <property name="プロパティ名" direction="desc"/>
    </datastore-index>
</datastore-indexes>

これを作って再デプロイしたら上手く動いた。良かった良かった。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3