During the development of a reporting solution that depends heavily on search, I encountered an issue with the crawled and managed properties on SharePoint Online.
The problem was narrowed down to two issues.
- Not all the fields where showing up as crawled properties.
- The crawled/mapped property for the user fields only contains the display name.
When a user field is added normally there are multiple crawled properties that will appear, the ows_[field name] and the ows_q_USER_[field name]. Only the ows_[field name] was showing up.
The ows_[field name] only contains the display name, but I needed the display name and e-mail. The the ows_q_USER_[field name] was required, which contains all the available user information. Both issues were resolved using by following the steps below.
Solution: User field
- Make sure the field is added to an item and contains a value, otherwise it will not be crawled.
- Determine the required managed property type, for a people field that is a string.
- Add the crawled property to a preset managed property, the name will be similar to ows_[field name].
- Map ows_[field name] to RefinableString00.
- After about 15 minutes more crawled and managed properties will be available.
- For an user field we need the crawled property ows_q_USER_[field name].
- Connect this crawled property to a new mapped property or use the one that was automatically created.
- I recommend not to remove the mapping of the crawled property (ows_[field name]) to the preset managed property. In some cases, this causes the problem to reappear.
Solution: No crawled property availible
This solution works a little bit different.
- Determine the required managed property type, for a text field that is a string.
- Make sure the field is added to an item and contains a value, otherwise it will not be crawled.
- Force a reindex.
- Go to the advanced settings of the list or library
- Reindex the list
- Wait 15-30 minutes and see if the field has been crawled, the name will be similar to ows_[field name].
- If this did not work try the following steps.
- Add a (random) text field to a preset managed property, for example to RefinableString01.
- Wait 15-30 minutes and see if your field has been crawled, the name will be similar to ows_[field name].
- If so add the crawled property to your custom managed property.
- So far, these steps have always fixed my missing properties problem.