0

我创建了一个搜索索引,用文档填充它,它按设计工作。现在我想使用开发控制台从索引中删除文档。

这样做时,我遇到了错误。

'Index' object has no attribute 'delete_documents'

完整的堆栈跟踪如下:

Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 1536, in __call__
  rv = self.handle_exception(request, response, e)
      File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 1530, in __call__
  rv = self.router.dispatch(request, response)
File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 1278, in default_dispatcher
  return route.handler_adapter(request, response)
File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 1102, in __call__
  return handler.dispatch()
File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\ext\admin\__init__.py", line 133, in xsrf_required_decorator
method(self)
File "C:\Program Files\Google\google_appengine\google\appengine\ext\admin\__init__.py", line 1766, in post
index.delete_documents(docs)
AttributeError: 'Index' object has no attribute 'delete_documents'
4

1 回答 1

1

这似乎是一个错误。我建议您在外部问题跟踪器中创建一张票。我将创建一个内部的。

同时编辑文件的第 1766 行C:\Program Files\Google\google_appengine\google\appengine\ext\admin\__init__.py,替换index.delete_documents(docs)index.remove(docs).

于 2012-09-07T00:00:12.363 回答