使用Golang在Datastore实体上使用GAE全文搜索API

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

GAE Full Text Search API on datastore entities using Golang

问题

我听说我们有适用于Golang的App Engine搜索API支持,但不清楚是否可以在GAE数据存储实体上使用此搜索API(Google IO 2011视频中提到可以,但不确定是否真的支持Golang)。对此有什么想法吗?有没有带有示例的好文档?非常感谢你的帮助。

英文:

I heard that we have app engine Search API support for Golang. but it is not clear if we have can use this search API on GAE datastore entities (the Google IO 2011 video says it is possible, but not sure if that is really supported using Golang). Any thoughts about this? and any good documentation with examples? really appreciate your help.

答案1

得分: 1

你不能在数据存储实体上运行全文搜索。要执行全文搜索,您需要在文本搜索索引中创建单独的文档,这与数据存储是独立的。如果您想对数据存储中的数据进行文本搜索,可以遍历数据并从实体创建文档,然后将其添加到全文搜索索引中。

关于文档,请使用您提供的链接 https://cloud.google.com/appengine/docs/go/search/ 查看相关信息。

英文:

You cannot run full text search on the datastore entities. To perform full text search you need to create separate Documents in the text search indexes, which is independent from the datastore. If you want to do text search on what data you have in the datastore, iterate over it and create the documents from the entities in full text search indexes.

For documentation , the link you provided

https://cloud.google.com/appengine/docs/go/search/

have the information in it.

huangapple
  • 本文由 发表于 2015年9月1日 11:48:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/32323225.html
匿名

发表评论

匿名网友

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

确定