CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Full text search searches first or last name, but not both together
Pages: [1]

Author Topic: Full text search searches first or last name, but not both together  (Read 2319 times)

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Full text search searches first or last name, but not both together
March 24, 2011, 05:30:42 pm
As the title indicates, i can search for first or last name, but not first + last name.  Please advise

thanks!

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Full text search searches first or last name, but not both together
March 24, 2011, 10:11:59 pm
In this case, I guess fulltext search won't work. What's your use case ?

Kurund
Found this reply helpful? Support CiviCRM

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: Full text search searches first or last name, but not both together
March 27, 2011, 06:13:53 pm
I am hoping to use the full text search as an easy search form for my users.  The problem is that they tend to want to type in the full name rather than first OR last in order to find the specific person they are searching for, rather than return a huge list of possible matches**.  It seems unintuitive to them to search for only first or last, which I agree (which also requires that I give them on screen instructions to only use first or last, and we all know people dont read).  Furthermore, I can give them the link to the advanced search, however this is somewhat unintuitive for them as well as there are so many parameters to search on that they get overwhelmed, which I personally dont agree but can see their point.

For me (and I'm sure my users), when I am presented with text that says "Full Text Search", I would assume that it means exactly that, full text...whereas its not at all full text, its first or last but not both.  Please do not take this as a scathing remark, more so a usability observation/concern.

**For example, if a user wants to search for John Smith using the full text, as current they can only search for John or Smith.  Lets say we have 150 contacts with the first name John, or 75 with the last name Smith, the search results are quite long and require them to scan a long list before they find the contact of which they are searching, which can become aggravating for them.

Perhaps I can build a custom search form for them that will provide First, Last, Organization and email to search by?

Thanks!!
« Last Edit: March 27, 2011, 06:17:48 pm by everything »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Full text search searches first or last name, but not both together
March 27, 2011, 07:26:21 pm

the full text search came about thanx to PHP (Physician health program in BC) and was targetted initially to what they needed and generalized a wee bit so other folks could also use it.

You'lll need to write your own specific custom search to meet the specific needs of your org. If/When u do so, please publish your code so others can benefit

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Full text search searches first or last name, but not both together
March 27, 2011, 08:45:22 pm
So the problem is that the current code for Full Text search is not including the display_name column. It includes the sort_name column which stores Individuals as "lastName, firstName". Hence searching on the following works:

lastName
firstName
lastName, firstName

The display_name column stores Individuals as "Prefix firstName lastName Suffix" (of course depending on whether prefix and / or suffix have values in them). EXAMPLE: sort_name = "Smith, John" and display_name might be "Mr. John Smith Jr.".

I discovered it was quite easy to add in display_name to that search, so it will be part of the next 3.4 beta. You should be able to get a patch from the fisheye tab on this issue after I commit the fix (probably tomorrow):

http://issues.civicrm.org/jira/browse/CRM-7835





Protect your investment in CiviCRM by  becoming a Member!

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: Full text search searches first or last name, but not both together
March 29, 2011, 09:22:15 pm
Hey lobo, thats great to hear!  Thanks a ton!!

And, fwiw, awesome burmese in your avatar, one of my friends has one they are great dogs
« Last Edit: March 29, 2011, 09:44:57 pm by everything »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Full text search searches first or last name, but not both together
April 14, 2011, 11:40:45 pm
Hi,

We have experimented a replacement for the autocomplete on the top left corner. Works better for us, give it a go and let us know.

https://github.com/tttp/civicrm_qlookup
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Full text search searches first or last name, but not both together

This forum was archived on 2017-11-26.