Answers.Body: <p>It doesn't look like it's possible to pass an array of attributes to the <code>attribute</code> parameter, the Craft docs explicitly state that it expects a string.</p>
  
  <p><a href="https://craftcms.com/docs/config-settings#defaultSearchTermOptions" rel="nofollow">https://craftcms.com/docs/config-settings#defaultSearchTermOptions</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-10T00:27:37.643Z
Answers.LastActivityDate: 2016-02-10T16:50:07.523Z
Answers.LastEditDate: 2016-02-10T16:50:07.523Z
Answers.UserDisplayName: carlcs
Answers.Body: <p>Think it should be:</p>
  
  <pre><code>search: {
    attribute: {
      'keywords', 
      'body', 
      'title'
    }
  },
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-09T21:15:36.047Z
Answers.Text: Unfortunately, no. That returns the same error. There are other key/value pairs.
Answers.UserDisplayName: Bud Parr
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-09T21:03:19.930Z
Answers.LastActivityDate: 2016-02-09T21:03:19.930Z
Answers.UserDisplayName: Dave Driesmans
Body: <p><em>Craft Pro 2.5.2761 (no plugins)</em></p>
  
  <p>I've got a basic search form, and on my results template, the following:</p>
  
  <pre><code>{% set query = craft.request.getParam('q') %}
  
  {% set articles = craft.entries({
  section: 'article',
  order: 'score',
  search: {
    attribute: 'keywords',
    query: query,
    subLeft: true,
    subRight: true
  }
  }) %}
  </code></pre>
  
  <p>Which works as expected (I get results when the query term matches the keyword of an entry). </p>
  
  <p>However, I want my search to encompass not just keywords, but also the  title and the body field. </p>
  
  <p>[edit - deleted part of my post because it was misleading as to the real problem]</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-10T00:30:31.547Z
Comments.Text: You're using the object syntax, which expects key-value pairs `{% set var = {'key1': 'value1', 'key2': 'value2'} %}`. Try this to set an array `{% set var = ['value1', 'value2'] %}`, but I don't actually expect this to work. See my answer below.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-10T05:01:16.410Z
Comments.Text: You're right, on both counts. I had tried that (only posted the last thing I tried, in desperation), and it didn't work, as you thought.
Comments.UserDisplayName: Bud Parr
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-10T17:09:54.370Z
Comments.Text: Now that you modified your question, it's probably a dupe of the one I linked to above. I hope you find the new answer I just posted to it helpful.
Comments.UserDisplayName: carlcs
Tags: <search>
Title: Set Search to query multiple attributes (e.g. title, body)
ThreadText: # Set Search to query multiple attributes (e.g. title, body)
  
  (Asked by: username_0 on 2016-02-09)
  
  *Craft Pro 2.5.2761 (no plugins)*
  
  I've got a basic search form, and on my results template, the following:
  
  ```
  {% set query = craft.request.getParam('q') %}
  
  {% set articles = craft.entries({
  section: 'article',
  order: 'score',
  search: {
    attribute: 'keywords',
    query: query,
    subLeft: true,
    subRight: true
  }
  }) %}
  
  ```
  
  Which works as expected (I get results when the query term matches the keyword of an entry).
  
  However, I want my search to encompass not just keywords, but also the title and the body field.
  
  [edit - deleted part of my post because it was misleading as to the real problem]
  
  **Tags:** search
  
  > **Comments:**
  > **username_1**: You're using the object syntax, which expects key-value pairs `{% set var = {'key1': 'value1', 'key2': 'value2'} %}`. Try this to set an array `{% set var = ['value1', 'value2'] %}`, but I don't actually expect this to work. See my answer below.  
  > **username_0**: You're right, on both counts. I had tried that (only posted the last thing I tried, in desperation), and it didn't work, as you thought.  
  > **username_1**: Now that you modified your question, it's probably a dupe of the one I linked to above. I hope you find the new answer I just posted to it helpful.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-02-10. Score: 2
  
  It doesn't look like it's possible to pass an array of attributes to the `attribute` parameter, the Craft docs explicitly state that it expects a string.
  
  <https://craftcms.com/docs/config-settings#defaultSearchTermOptions>
  
  
  ---
  
  ### Answer by username_2 on 2016-02-09. Score: 0
  
  Think it should be:
  
  ```
  search: {
    attribute: {
      'keywords', 
      'body', 
      'title'
    }
  },
  
  ```
  
  > **Comments:**
  > **username_0**: Unfortunately, no. That returns the same error. There are other key/value pairs.  
  
  ---
  
  