2014-11-06 66 views
0

这是关于在Search API中放置大量文档的限制的问题。我打算把2057份文件(来自文本文件的段落)。当我从文本文件解析每个段落时,为每个段落创建文档并将其放入索引中,应用程序似乎永远在运行而根本没有响应。什么可能是这种行为的原因?放置大量文档:Google App Engine和Search API

至于

+0

好,w帽子做日志说什么? – 2014-11-06 15:03:49

+0

它超时吗?是否有任何东西被添加到您的搜索索引?正如前面的评论者所问 - 日志中是否有任何东西出现?你能提供一些代码来显示你到底在做什么吗? – 2014-11-06 17:04:17

+0

@PaulCollingwood,谢谢你的回复。我明白,导入大量文档进行索引需要很长时间。 – nurgasemetey 2014-11-06 17:11:30

回答

0

我研究了文件,发现下面的方法:

put(java.lang.Iterable<Document> documents) 

我的导入这样的方式:

1. I collect all documents to be put into index in collector(ArrayList, List) until 200 documents(it's limit by GAE) 
2. Put this collector into this method 

在我的情况下,减少的时间由次