-->

GAE Full Text Search API phrase matching

2019-01-20 01:01发布

问题:

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.