Domanda

I am working on sharepoint server 2013 , and i want to show a page which lists all our users, so i did the following steps :-

  • Create a new site collection of type "Enterprise Search Center".
  • Add a new page which have the "People Search" page layout.
  • Modify the "Search Results" web part, and i change the query to show all people which have @ in their work email as follow:-

enter image description here

  • but the search did not return any results:-

enter image description here

Although when i click on a username link (such as i click on the username inside modifiedBy field) inside a sharepoint list item, i will be redirected to the following page, which shows the email address:-

enter image description here

so can anyone adivce how i can force the People Search to show results ?

È stato utile?

Soluzione

There are two parts to this, the first to ensure that you're getting the e-mail addresses in AD into the user property store in SharePoint and the second to sort out the correct query to return the users you want.

By default the WorkEmail user property is mapped to the proxyAddresses field in AD. This corresponds to the 'alternate e-mail address' field which can be set using ADSIEdit or PowerShell. If you don't populate that field in AD, you'll need to remap the field in SharePoint to the more commonly used 'mail' attribute. Check whether your user profiles in SharePoint have work e-mail address populated before making the changes to the mapping. To change the mapping:

  1. In your user profile service application, select 'manage user properties'.
  2. Locate the 'Work email' field under the 'Contact Information' category. Click this field and select 'edit' from the menu shown.
  3. Near the bottom of the user profile property page, locate 'Property Mapping for Synchronization'. You'll notice that proxyAddresses is currently mapped.
  4. Remove this mapping by clicking the 'Remove' button.
  5. Add 'mail' as a new mapping by selecting this from the Attribute field in the 'Add New Mapping' section, then click 'Add'.
  6. Ensure that the mapping now looks like this: Work email user profile property mapping
  7. Click OK to save the new mapping.

You should now trigger a full user profile synchronisation to ensure that e-mail addresses are synchronised. Check that work e-mail fields are now populated with the values in AD.

Searching for users using the '@' doesn't seem to work. Queries based on just this term return no results.

In essence, we're looking for a person whose work e-mail is not empty, so we can use the following (albeit rather ungainly) query to return this:

contentclass=spspeople (WorkEmail:a* OR WorkEmail:b* OR WorkEmail:c* OR WorkEmail:d* OR WorkEmail:e* OR WorkEmail:f* OR WorkEmail:g* OR WorkEmail:h* OR WorkEmail:i* OR WorkEmail:j* OR WorkEmail:k* OR WorkEmail:l* OR WorkEmail:m* OR WorkEmail:n* OR WorkEmail:o* OR WorkEmail:p* OR WorkEmail:q* OR WorkEmail:r* OR WorkEmail:s* OR WorkEmail:t* OR WorkEmail:u* OR WorkEmail:v* OR WorkEmail:w* OR WorkEmail:x* OR WorkEmail:y* OR WorkEmail:z* OR WorkEmail:0* OR WorkEmail:1* OR WorkEmail:2* OR WorkEmail:3* OR WorkEmail:4* OR WorkEmail:5* OR WorkEmail:6* OR WorkEmail:7* OR WorkEmail:8* OR WorkEmail:9*)

In my lab, there are three users (out of about 10) with e-mail addresses specified, which returns the following results when the query is tested: Search query test

Altri suggerimenti

There are multiple reasons Search won't return results but this is how I usually troubleshot it.

First of all, we need to make sure Search can find the data. I will drop a CSWP from source site and give it the same query. For this case, your query seems very vague; which means SP would spend a lot of time to pull back huge amount of items and eventually time out. If CSWP couldn't retrieve data I would re-write query and make it more specific, if CSWP can retrieve data then you 'save' it and drop another Search Result Web Part and paste the query that should work.

There are some other configuration can stop search showing your data, since I don't know what kind of property is it and whether it related to Catalog items I couldn't tell now.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top