2008年4月14日月曜日

Google App Engine 入門6 検索件数


Docs > Datastore API > Keys and Entity Groups の
Entity Groups, Ancestors and Paths の以下の部分は重要そうです。


When the application creates an entity, it can assign another entity as the parent of the new entity. Assigning a parent to a new entity puts the new entity in the same entity group as the parent entity.

An entity without a parent is a root entity. An entity that is a parent for another entity can also have a parent. A chain of parent entities from an entity up to the root is the path for the entity, and members of the path are the entity's ancestors. The parent of an entity is defined when the entity is created, and cannot be changed later.


データモデルについてはgoogle-appengine groupも議論が行われている 1:1,1:n 
Small tutorial on ER-modeling with GAE - 6 new
http://groups.google.com/group/google-appengine/t/aa26d529d66ac376?hl=en

  I wrote a small tutorial about ER-modeling with Google App Engine:
  http://daily.profeth.de/2008/04/er-modeling-with-google-app-engine.html


fulltext search機能の現状について  Indexing Large Chunks of Text for Search
 There's no ranking, which is a killer drawback. (致命的欠点)
 no exact phrase match, substring match, boolean operators,
 support for stop words (common words that are not indexed) is currently limited to English.


・検索結果の件数について

Docs > Datastore API > GqlQuery を参考
* bind()
* get()
* fetch()
* count()

greetings = Greeting.all().order('-date')
row_cnt = greetings.count()
で件数をカウントすることができました。

Migration Python2.7への移行

1. 以前のプログラムのソースをダウンロードして、 app.xml を変更して deployする 503 python -V // まず Mac にインストールされている python のバージョンを確認 504 pwd 505 curl https://sdk.cl...