title: How do I implement advanced search with operators with pg_search?
body: <p>I have implemented PgSearch on my <code>Node</code> model like so:</p>
  
  <pre><code>include PgSearch
  pg_search_scope :node_search, against: [:name, :user_id, :circa],
      using: { tsearch: { any_word: true} },
      :associated_against =&gt; {
        comments: [:message],
        user: [:first_name, :last_name, :email],
        memberships: [:relation]
      }
  </code></pre>
  
  <p>And in my controller I have this:</p>
  
  <pre><code>if params[:search]
    @nodes = Node.node_search(params[:search])
  end
  </code></pre>
  
  <p>Ideally, what I would like to be able to do though, is have someone be able to type in the text representation (a flag) of one of the associations and have the search filter just on that flag.</p>
  
  <p>E.g. say: "name: Bouncing Ball", where the search would take place just on the column called <code>name</code> on the <code>nodes</code> model. Aka...it would look for all the nodes with the name <code>Bouncing Ball</code> and not search other columns or models or even any of the associations.</p>
  
  <p>Naturally, I would like to be able to do searches like:
  <code>owner: John Brown</code> (which searches for all nodes whose owner/user first_name and last_name are John Brown), <code>comment: Manhattan</code> (which searches for all nodes that have a comment with the text <code>Manhattan</code> in the copy, and so on.</p>
  
  <p>How do I achieve this with PgSearch? </p>