【问题标题】:Overcoming the size entry size limit for appengine search?克服应用引擎搜索的大小条目大小限制?
【发布时间】:2011-02-09 11:52:02
【问题描述】:

我正在尝试对博客条目使用可搜索模型,它在开发平台上运行良好,但是当我尝试在云中添加条目时出现错误:

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}

这些条目不是那么大(

【问题讨论】:

  • 他们没有在配额文档中指定限制。尝试在 GAE 的论坛/组/邮件列表中询问。

标签: python google-app-engine google-cloud-datastore searchable


【解决方案1】:

您似乎遇到的称为爆炸索引。你可以在这里阅读更多关于它们的信息:http://code.google.com/appengine/docs/python/datastore/queries.html#Big_Entities_and_Exploding_Indexes

基本上你不能使用 AppEngine 来创建全文引擎,除非你有一个非常小的数据集。要么您会遇到爆炸性索引,要么您会遇到其他问题(即合并连接超时)。我建议您研究一个名为 IndexTank 的服务,它是一个非常好的全文搜索服务。它具有完整的 REST api 和 python 客户端,因此可以轻松上手 AppEngine。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-05
    • 1970-01-01
    • 2021-08-04
    • 2016-05-07
    • 2018-05-03
    相关资源
    最近更新 更多