GAE Full Text Search API phrase matching

时光总嘲笑我的痴心妄想 提交于 2019-11-27 07:09:10

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/10523987/gae-full-text-search-api-phrase-matching

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!