0

我想使用博客條目的搜索模型,它在開發平臺上工作得很好,但是當我嘗試添加在雲中的條目,我得到一個錯誤:克服appengine搜索的大小入口大小限制?

Traceback (most recent call last): 
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/init.py", line 517, in call 
    handler.post(*groups) File 
"/base/data/home/apps/smart-fast/1.348228399174418277/admin.py", line 76, in post 
    article.put() 
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/init.py", line 895, in put 
    return datastore.Put(self._entity, config=config) 
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 404, in Put 
    return _GetConnection().async_put(config, entities, extra_hook).get_result() 
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 601, in get_result 
    self.check_success() 
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 572, in check_success 
    rpc.check_success() 
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 502, in check_success 
    self.__rpc.CheckSuccess() 
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 126, in CheckSuccess 
    raise self.exception 
ApplicationError: 

ApplicationError: 1 Too many indexed > properties for entity: app: 
"smart-fast",path < Element { type: "Article", id: 2002 }> This index put 
it over the limit: entity_type: "Article",ancestor: false, 
Property { name: "searchable_text_index", direction: ASCENDING}, 
Property { name: "searchable_text_index", direction: ASCENDING}, 
Property { name: "date", direction: ASCENDING} 

這些條目都不是大(< 500字)是低限?我認爲解決這個問題的唯一方法是將條目存儲爲不可搜索的模型,並將條目文本分成較小的可搜索模型,每個模型引用主條目。 任何幫助,非常感謝

+0

它們沒有在配額文件中指定限制。嘗試在論壇/組/郵件列表中詢問GAE。 – 2011-02-09 13:15:21

回答

0

你似乎跑到什麼叫做爆炸索引。你可以在這裏閱讀更多關於它們的信息:http://code.google.com/appengine/docs/python/datastore/queries.html#Big_Entities_and_Exploding_Indexes

基本上你不能使用AppEngine創建一個全文引擎,除非你有一個非常小的數據集。它要麼會遇到爆炸索引,要麼會遇到其他問題(即合併連接超時)。我建議您查看名爲IndexTank的服務,該服務是非常好的全文搜索服務。它有一個完整的REST api和python客戶端,所以AppEngine很容易上手。