# File lib/puppet/indirector/resource/puppetdb.rb, line 81
  def build_predicate(op, field, value)
    # Title and tag aren't parameters, so we have to special-case them.
    expr = case field
           when "tag"
             # Tag queries are case-insensitive, so downcase them
             ["=", "tag", value.downcase]
           when "title"
             ["=", "title", value]
           else
             ["=", ['parameter', field], value]
           end

    op == '!=' ? ['not', expr] : expr
  end