英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论