/ #search 

Office 365 and the search schema

Office 365 and the search schema header image

Office 365 allows you to manage the search schema as you can do on your on premise environment. This allows you to use the search capabilities in custom apps or to write complex queries with properties that are not available out of the box. By creating your own managed properties you can leverage the crawled properties for that purpose. So if you are thinking of using those capabilities in Office 365 you should be aware that you can only create two types of managed properties:

  • Text
  • Yes/No

Properties that are not available in Office 365 and are disabled in the edit screen are:

  • Integer
  • Decimal
  • Date and Time
  • Double
  • Binary

These properties are available on premise, so even though the crawler might create crawled properties for your content of that specific type you cannot create your own managed properties to use those values. Luckily the Office 365 team did plan a bit ahead and created a few of those properties for us as a placeholder. Since for the Managed Properties of the types that that you cannot create, except the binary one, the Office 365 team created placeholders. If you check the managed properties that are available out of the box, and you will search for refinable, you will find that there are a set of RefinableType properties available. Actually there will be 20 times a  RefinableDate property, 10 times a RefinableDecimal property, 10 times a RefinableDouble property and 10 times a RefinableInt property. You can edit these properties to your liking, and modify them to satisfy your needs. By adding an Alias you can even make them look like a property you created yourself, and obviously you can add the crawled properties you need in your query.

When you have created a new managed property, or changed an existing one, it will take some time for your changes to take affect. It all will be available once the content has been recrawled, depending on the where the data lives it can take up to a week before your changes are shown. If you have data in a list or library you can request a re-crawl for that specific list or library by going to the list or library settings page and click on advanced settings. On the advanced settings page you can scroll down to the button ‘Reindex document library’ and by clicking that button you will be asked to confirm that your list or library should be recrawled. My experience is that if you do that it can take up to 24 hours before your changes are visible but usually it is a bit quicker. If your data is not in a list or library you have no option to speed the process up and will have to wait up to a week before you can use your properties.

Being able to manage the search schema allows you to create custom queries that would not have been possible otherwise, so it is a pretty nice functionality. You can then use your search queries either in the search WebParts that are available, or use it in your apps with the REST model.

Loading comments…