搜索支持Google App Engine Go运行时

huangapple go评论80阅读模式
英文:

Search support for Google App Engine Go runtime

问题

有关Python和Java的搜索支持(实验性),最终可能也会支持Go。在那之前,我如何对我的记录进行最小化搜索?

通过邮件列表,我得到了一个关于将搜索请求代理到Python后端的想法。我仍在评估GAE,并且尚未使用后端。要使用Python后端设置搜索,我是否必须通过此后端将所有请求(来自Go)发送到数据存储?这有多实用,有什么缺点?有关此方面的任何教程吗?

谢谢。

英文:

There is search support (experimental) for python and Java, and eventually Go also may supported. Till then, how can I do minimal search on my records?

Through the mailing list, I got an idea about proxying the search request to a python backend. I am still evaluating GAE, and not used backends yet. To setup the search with a python backed, do I have to send all the request (from Go) to data store through this backend? How practical is it, and disadvantages? Any tutorial on this.

thanks.

答案1

得分: 3

您可以创建一个RESTful的Python应用程序,其中包含几个处理程序,您的Go应用程序将通过urlfetch与Python应用程序进行通信。然后,您可以将Python应用程序作为后端或前端运行(与Go应用程序的不同版本)。第一个处理程序将接收一个键作为输入,从数据存储中获取该实体,然后将相关信息存储在搜索索引中。第二个处理程序将接收一个查询,在索引中进行搜索,并返回结果。您还需要一个处理程序来从搜索索引中删除文档以及其他您想要的操作。

除了第一个处理程序接收键并从数据存储中获取之外,您还可以将实体数据直接发送给它。

您还可以暂时使用IndexDen等服务(特别是如果您没有要索引的实体):
http://indexden.com/

在进行urlfetch时,请记住当前配额即使在请求自己应用程序的URL时也适用。在问题跟踪器中有两个问题请求在与自己的应用程序通信时删除/增加这些配额,但不能保证会发生。请参见以下链接:

英文:

You could make a RESTful Python app that with a few handlers and your Go app would make urlfetches to the Python app. Then you can run the Python app as either a backend or a frontend (with a different version than your Go app). The first handler would receive a key as input, would fetch that entity from the datastore, and then would store the relevant info in the search index. The second handler would receive a query, do a search against the index, and return the results. You would need a handler for removing documents from the search index and any other operations you want.

Instead of the first handler receiving a key and fetching from the datastore you could also just send it the entity data in the fetch.

You could also use a service like IndexDen for now (especially if you don't have many entities to index):
http://indexden.com/

When making urlfetches keep in mind the quotas currently apply even when requesting URLs from your own app. There are two issues in the tracker requesting to have these quotas removed/increased when communicating with your own apps but there is no guarantee that will happen. See here:

答案2

得分: 1

很快,Go运行时将会支持全文搜索。

英文:

There is full text search coming for the Go runtime very very very soon.

huangapple
  • 本文由 发表于 2012年9月4日 06:08:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/12254547.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定