Freigeben über


How to disable phonetic search for the federated people search

I was at a presentation during the SharePoint Conference 2011 where one of the presenters said that she would like to have the option of turning off the phonetic search option when showing federated people results. She said she hoped this would be added as an ability in the next version of SharePoint.

I thought there had to be a solution to this, and finally the solution struck me. It was a matter of changing the federation location in a particular way. First of all, an example, using the downloadable VM image with SharePoint and FAST. If you search for “contoso”, you get this result:

search for bar

We want to avoid this, and just get people matches in names here, as shown here:

search for contoso - name only

To do this, we go into Central Administration and navigate to the search application and then “Federated Locations”, as shown here:

People search federated location

Change the “Query Template” under “Location Information” from

{searchTerms}

to

{searchTerms} AND (FirstName:{searchTerms} OR LastName:{searchTerms})

Click OK, and you’re done.

NOTE 1: This syntax seems a little more verbose than necessary, but I found that without the initial “{searchTerms}” entry, nothing was returned.

NOTE 2: There seems to be a small delay before this changed is picked up by the front-end, so please retry after a couple of minutes if it does not work immediately.

Comments

  • Anonymous
    July 30, 2012
    Thanks Thomas, this works great to omit the phonetic and nickname results but it seems to have an issue where it only allows one search term. If I add the first name AND last name in the search query, I get this error: "Your query is malformed. Please rephrase your query." If I reset the template back to {searchTerms}, it works fine (except I get the phonetic results again).  Are you experiencing this same problem? or is it something on my end?

  • Anonymous
    July 17, 2013
    Hello Thomas, spJC comment is correct, if you search for more that one term you get a malformed query, however this is not the end of the world as you are virtually there. In the FAST Query Service Application the Federated location for People Search we edit the template and change the "Query Template" under "Location Information" from {searchTerms} to {searchTerms} AND (FirstName:{term1} OR LastName:{term1}) Now add A Trigger to catch {term1}                     Pattern: Query must match a specified pattern                    (?<term1>w+) I have not played with multiple term catches but this does appear to work

  • Anonymous
    November 04, 2013
    Hi .. Thanks alot and worked for us .. tooo Thanks again

  • Anonymous
    November 05, 2013
    Do you find any option to Sort Results by LastName alphabetically

  • Anonymous
    November 05, 2013
    My Client wants the People results to be sorted alphabetically  last name by any suggestions please??

  • Anonymous
    December 10, 2013
    Is there any solution for the "Your query is malformed. Please rephrase your query." when i search with more the one term i do get the same error... Please let me know