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

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

问题描述

我只能在 Google App Engine 的实验性搜索 API 中找到与查询完全匹配的词组.例如,查询最佳价格酒店"将仅匹配该确切短语.它不会匹配诸如最佳酒店价格"或最佳价格酒店"之类的文本.当然,以一般方式匹配文本是一项困难得多的任务,但我认为 Search API 至少能够处理其中的一些.

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'.

推荐答案

您应该能够使用~"运算符来重写查询以包含复数形式.例如,~hotel~"best price hotel".

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

应在下一个应用引擎 SDK 版本中添加有关此运算符的文档.

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

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

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