Answers.Body: <p>This is fixed recently fixed against coming 4.6.6 code-base and here's the fix <a href="https://github.com/civicrm/civicrm-core/pull/6256/files" rel="nofollow">https://github.com/civicrm/civicrm-core/pull/6256/files</a> and <a href="https://github.com/civicrm/civicrm-core/pull/6299/files" rel="nofollow">https://github.com/civicrm/civicrm-core/pull/6299/files</a>  </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-28T11:44:52.010Z
Answers.LastActivityDate: 2015-07-28T11:44:52.010Z
Answers.UserDisplayName: Monish Deb
Answers.Body: <p>After you have made your advanced search and get no results, you will stay on the advanced search page.</p>
  
  <p>If you look at the bottom of that page it will say "No matches found for:" and then list the options you have chosen. Can you see anything in there that wasn't related to the options you picked?</p>
  
  <p>I only mention this as I have a similar problem and I can see that the "Preferred Language" field is being set to Afrikaans, so therefore making any advanced searches yield no results.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-24T15:27:50.177Z
Answers.Text: Thank you garethh for prompting me to think of other possible factors. I search through each of the other options to see if something was turning on when it wasn't supposed to (like your Preferred Language issue), but unfortunately, no such luck.  I'm still not sure what's causing this.
Answers.UserDisplayName: Allen Hutchison
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-30T12:41:21.227Z
Answers.Text: I agree that still there are lot of contact attributes e.g. preferred communication, world-region, email etc. failing in Search forms/get.Api. Can someone please create a issue for this, if possible list all the possible fields which are not working in Search Builder/Advance Search/custom searches!! Thanks
Answers.UserDisplayName: Monish Deb
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-24T10:15:22.197Z
Answers.LastActivityDate: 2015-07-24T10:15:22.197Z
Answers.UserDisplayName: garethh
Answers.Body: <p>This was resolved by reloading my 4.5.8 database and code then upgrading to 4.6.4.  Not a proper solution because I still don't know why the search results differed, but effective for our production environment.  When 4.6.6 comes out, I'll test to see if this is truly fixed.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-25T23:37:37.713Z
Answers.LastActivityDate: 2015-07-25T23:37:37.713Z
Answers.UserDisplayName: Allen Hutchison
Body: <p>We upgraded yesterday from 4.5.8 to 4.6.5 (with Drupal 7.38). We have a number of custom fields for Individuals which are type multi-select (child's grade in school, marital status, etc.).  When we search on those fields from the Advanced search screen, the search yields no results.  However, if I create the same search in Search Builder, I get results.</p>
  
  <p><strong>Search Builder example</strong> (this is the only search criteria): </p>
  
  <blockquote>
    <p>Individual > Marriage:Marital Status > = > Widow/Widower</p>
  </blockquote>
  
  <p>I get 16 results.</p>
  
  <p>If I build that same search in Advanced search, I get 0 results.</p>
  
  <p>Any ideas?</p>
  
  <p>I turned on CIVICRM_DEBUG_LOG_QUERY per this post: <a href="https://civicrm.stackexchange.com/questions/3752/how-can-i-tell-what-the-query-that-is-executing-when-i-do-an-advanced-search-loo">How can I tell what the query that is executing when I do an Advanced Search looks like?</a>.  But, not knowing exactly what I was looking for in the log file, I can't tell what is amiss in the Adv Search.</p>
  
Tags: <custom-fields><search><search-results><search-builder>
Title: Different search results in Adv Search vs Search Builder
ThreadText: # Different search results in Adv Search vs Search Builder
  
  (Asked by: username_0 on 2015-07-23)
  
  We upgraded yesterday from 4.5.8 to 4.6.5 (with Drupal 7.38). We have a number of custom fields for Individuals which are type multi-select (child's grade in school, marital status, etc.). When we search on those fields from the Advanced search screen, the search yields no results. However, if I create the same search in Search Builder, I get results.
  
  **Search Builder example** (this is the only search criteria):
  
  > Individual > Marriage:Marital Status > = > Widow/Widower
  
  I get 16 results.
  
  If I build that same search in Advanced search, I get 0 results.
  
  Any ideas?
  
  I turned on CIVICRM\_DEBUG\_LOG\_QUERY per this post: [How can I tell what the query that is executing when I do an Advanced Search looks like?](https://civicrm.stackexchange.com/questions/3752/how-can-i-tell-what-the-query-that-is-executing-when-i-do-an-advanced-search-loo). But, not knowing exactly what I was looking for in the log file, I can't tell what is amiss in the Adv Search.
  
  **Tags:** custom-fields, search, search-results, search-builder
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-07-28. Score: 1 | Accepted answer
  
  This is fixed recently fixed against coming 4.6.6 code-base and here's the fix <https://github.com/civicrm/civicrm-core/pull/6256/files> and <https://github.com/civicrm/civicrm-core/pull/6299/files>
  
  
  ---
  
  ### Answer by username_2 on 2015-07-24. Score: 2
  
  After you have made your advanced search and get no results, you will stay on the advanced search page.
  
  If you look at the bottom of that page it will say "No matches found for:" and then list the options you have chosen. Can you see anything in there that wasn't related to the options you picked?
  
  I only mention this as I have a similar problem and I can see that the "Preferred Language" field is being set to Afrikaans, so therefore making any advanced searches yield no results.
  
  > **Comments:**
  > **username_0**: Thank you username_2 for prompting me to think of other possible factors. I search through each of the other options to see if something was turning on when it wasn't supposed to (like your Preferred Language issue), but unfortunately, no such luck.  I'm still not sure what's causing this.  
  > **username_1**: I agree that still there are lot of contact attributes e.g. preferred communication, world-region, email etc. failing in Search forms/get.Api. Can someone please create a issue for this, if possible list all the possible fields which are not working in Search Builder/Advance Search/custom searches!! Thanks  
  
  ---
  
  ### Answer by username_0 on 2015-07-25. Score: 0
  
  This was resolved by reloading my 4.5.8 database and code then upgrading to 4.6.4. Not a proper solution because I still don't know why the search results differed, but effective for our production environment. When 4.6.6 comes out, I'll test to see if this is truly fixed.
  
  
  ---
  
  