title: Documentation for CONTAINS() in FQL?
body: <p>There have recently been <a href="http://facebook.stackoverflow.com/questions/4380391/search-for-people-by-name-in-fql">several</a> <a href="http://facebook.stackoverflow.com/questions/10587789/fql-search-for-non-friend-people-and-sort-by-mutual-friends">questions</a> <a href="http://facebook.stackoverflow.com/questions/8271546/facebook-fql-javascript-result-set">posted</a> on Facebook.SO using <code>CONTAINS()</code> in the <code>WHERE</code> clause. It seems to work like the Graph API search function, AND functions as an indexed field. All great things for the FQL developer.</p>
  
  
  
  <pre class="lang-sql prettyprint-override"><code>SELECT name,
         username,
         type
  FROM   profile
  WHERE  CONTAINS("Facebook")
  </code></pre>
  
  <p>However, the only official mention of the <code>CONTAINS</code> function appears in the <a href="https://developers.facebook.com/docs/reference/fql/unified_thread/" rel="nofollow">unified_thread</a> documentation. It is mentioned in passing, as a way to search for text contained in a message. It also appeared in this <a href="http://www.fbrell.com/hidden/whitepages" rel="nofollow">fbrell code sample</a>.</p>
  
  <p>But <code>Contains</code> doesn't seem to be a straightforward search. For example, this query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT name
  FROM   user
  WHERE  CONTAINS("Joe Biden")
  </code></pre>
  
  <p>returns "Joe Biden" and also "Joseph Biden" and "Biden Joe". But it also returns "Joe Scardino", "Lindsay Noyan" and "Mehmad Moha" among others. What relationship do these people have with the VP of the USA? They aren't my friends, so I'll never know.</p>
  
  <p>There also appears to be the ability to pass <code>CONTAINS</code> a field to search on, however changing the end of my first query to `CONTAINS("Facebook", name) returns an OAuth error: </p>
  
  <pre class="lang-sql prettyprint-override"><code> (#615) 'name' is not a valid search field for the profile table.
  </code></pre>
  
  <p>In my not-so rigorous testing, I have yet to find a field/table combination that does not return this error.</p>
  
  <p>So what is this mystery function? How does it work? Can it allow us to do things to date impossible in FQL like traversing arrays and filtering data stored in strings?</p>
  
  <p>An answer here would be great, but a description on an FQL functions &amp; methods reference page on the official developer documentation site would be better still.</p>