如何在GAE中实现自动建议(自动完成)功能 [英] How to implement auto suggestion (auto complete) functionality in GAE
问题描述
我想在Google App Engine(GAE / GWT)中实现自动建议功能。
实现的客户端与GWT SuggestBox和RPC正常工作。
我的主要问题是实现的服务器端。我尝试了谷歌搜索API,但似乎有250MB的索引数据总量的限制,搜索可以完整的单词而不是每个单词的部分!
我应该如何解决这个问题?我读过lucene或solr在GAE中不支持。
我会很感激你对此的想法。
我采取了这种方法,
-
将文字分成单独的字词。摆脱重复,特殊字符和简短的单词(in,of和等)。
文本范围查询:
listProperty> = wordPart&& listProperty< wordPart +\\\�
I want to implement auto suggest functionality in Google App Engine (GAE/GWT).
The client side of the implementation works fine with GWT SuggestBox and RPC. My main issue is the server side of the implementation. I tried the Google search API but it seems that there is a limitation of 250MB of total indexed data and the search can be performed on complete words and not parts of each word!
How should I approach this? I read that lucene or solr is not supported in GAE. I would appreciate your thoughts on this.
I've taken this approach and it works fine for me:
Split up text into separate words. Get rid of duplicates, special characters and short words (in, of, and, etc..).
Add this list of words to entity as a list property.
Search via text range query:
listProperty >= wordPart && listProperty < wordPart + "\ufffd"
这篇关于如何在GAE中实现自动建议(自动完成)功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!