Monday, November 10, 2014

How to: Make sure User Profile properties are free/full-text searchable

You get a requirement to add a new property called FavoriteColor to the user profile application, which you want searchable on the people search page. You create it, you fill it in, you wait for a crawl so that the crawled property People:FavoriteColor shows up, you create a new managed property named FavoriteColor, map your crawled property to it, fire off a full crawl for people, head over to people search page and type your favorite color.

Nothing shows!

However, if you type FavoriteColor:color, you get results.

I’ve gotten this question four or five times now, so thought I’d write it up.

The solution is as hard as it is easy. When you create a new managed property, it is by default added to the Default full-text index, not the PeopleIdx full-text index. The full text-index is what is used when you perform a free text query (as apposed to a property query). When querying for people you have to make sure your managed property is in the PeopleIdx.

On the managed property settings page, click the  Advanced Searchable Settings button, and pick PeopleIdx from the dropdown.

image

Next up perform a new full-crawl of the UPA, and it should all work!

If you are curious what the FullTextIndex1/2/3 are, just stay away from them and don’t give it a second thought. They could in theory be useful, but when moving from FAST Search for SharePoint to 2013, some query logic was forgotten, so they are all but useless (known issue by the product team, and a ticket has been filed and archived). I might do a write up on that later – but not too many would be interested in it.

4 comments:

  1. I am very curious about FullTextIndex1/2/3

    ReplyDelete
    Replies
    1. You should be, but just forget about it :) I might blog on it but short story is they are unusable due to defects in the query API's.

      Delete
    2. And there is no way to create my own full text index to map properties to and search against?

      Delete
    3. Well..you certainly can. But you have no way to query it if you want ranked results. Ticked has been filed with MS, but suspect nothing will happen until critical mass ask for this....not that I know what that would be. (and it was filed once doing an internal MS project)

      Delete