简体   繁体   English

GAE Search API和数据存储区查询有什么区别?

[英]What's the difference between GAE Search API and Datastore queries?

I'm trying to understand which one of the search API or querying the datastore will be the most accurate for a search engine in my app. 我试图了解哪种搜索API或查询数据存储区对于我的应用程序中的搜索引擎而言是最准确的。

I want something very scalable and fast. 我想要非常可扩展且快速的内容。 That's mean be able to find something among up to millions results and very quickly. 这意味着能够迅速找到多达数百万个结果。 I mean as soon as a data has been registered , this one must be immediately searchable. 我的意思是,一旦注册了数据,就必须立即可以搜索该数据。

I'm seeking to make an autocomplete search system inspired by the google search system (with suggested results in real time). 我正在寻求一个受Google搜索系统启发(具有建议的实时结果)的自动完成搜索系统。

So, what is the more appropriate option to use for A google app engine user ? 那么,对于Google应用引擎用户来说,更合适的选择是什么?

Thanks 谢谢

Both Search API and the Datastore are very fast, and their performance is not dependent on the number of documents that you index. Search API和数据存储区都非常快,它们的性能并不取决于您建立索引的文档数。

Search API was specifically designed to index text documents. Search API是专门设计用于索引文本文档的。 This means you can search for text inside these text documents, and any other fields that you store in the index. 这意味着你可以搜索你的索引存储这些文本文档,以及其他领域的文本。 Search API only supports full-word search. Search API仅支持全字搜索。

The Datastore will not allow you to index text inside your documents. 数据存储区不允许您在文档中索引文本。 The Datastore, however, allows searching for entries that start with a specific character sequence. 但是,数据存储区允许搜索以特定字符序列开头的条目。

Neither of these platforms will meet your requirements out of the box. 这两个平台都无法立即满足您的要求。 Personally, I used the Datastore to build a search engine for music meta-data (artist names, album and recording titles) which supports both search inside a text string and suggestions (entries that contain words at any position which start with a specific character sequence). 我个人使用数据存储区为音乐元数据(艺术家姓名,专辑和唱片名称)构建了搜索引擎,该引擎既支持在文本字符串中进行搜索,也支持建议(在任何位置包含以特定字符序列开头的单词的条目) )。 I had to implement my own inverted index to accomplish that. 我必须实现自己的反向索引才能完成此任务。 It works very well, especially in combination with Memcache. 它非常有效,特别是与Memcache结合使用时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM