且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

FQL中的CONTAINS()文档?

更新时间:2023-02-15 09:25:01

我认为a并没有什么很好的答案在这里,但我可以提供一个解决方法,以解决不相关名称的返回问题-我怀疑这是因为人们公开发表了有关乔·拜登的文章,喜欢他,等等。如果您执行以下操作:

SELECT name FROM user WHERE CONTAINS("Joe Biden") AND strpos(lower(name),lower("Joe Biden")) >=0

You will get a resultset that only contains the right names- though it removes the advantage of also returning Joseph Biden, etc. etc.

您将得到一个仅包含正确名称的结果集,尽管它消除了返回约瑟夫·拜登等优点的优点。

My personal point of pain is that CONTAINS() appears to work with partial strings (e.g. "Joe Bide") on the profile table, but not on the user table. Very frustrating.