GAE全文搜索API词组匹配 [英] GAE Full Text Search API phrase matching

查看:154
本文介绍了GAE全文搜索API词组匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只能在Google App Engine的实验性搜索API中查找精确的词组匹配。例如,查询最佳价格酒店只会匹配该确切短语。它不会与最佳酒店价格或最佳价格酒店等文字相匹配。以一般方式匹配文本当然是一项更加困难的任务,但我认为Search API至少可以处理其中的一些内容。

另外一个例子是查询'新车',它不会匹配文本'新车和二手车'。

解决方案

您应该可以使用'〜'操作符重写查询以包含复数。
例如〜酒店〜最佳价格酒店



有关此运算符的文档应该添加到下一个应用程序引擎SDK版本中。


I can only find exact phrase matching for queries in the experimental Search API for Google App Engine. For example the query 'best prices hotel' will only match that exact phrase. It will not match texts such as 'best hotel prices' or 'best price hotels'. It's of course a much more difficult task to match text in a general way but I thought the Search API would at least be able to handle some of that.

Another example is the query 'new cars' which will not match the text 'new and used cars'.

解决方案

You should be able to use the '~' operator to rewrite queries to include plurals. E.g., ~hotel or ~"best prices hotel".

Documentation about this operator should be added in the next app engine SDK release.

这篇关于GAE全文搜索API词组匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆