Change or add new automatically created search managed properties to have the same type as site columns
Automatically created managed properties in SharePoint Online (and on-prem) are created from their corresponding site columns always as text (details at https://docs.microsoft.com/en-us/sharepoint/technical-reference/automatically-created-managed-properties-in-sharepoint). Basically, these managed properties are being created as textual representations of the values of their corresponding site columns. The problem with these approach is that we can only make free search queries with these managed properties even if the corresponding site column is of type Date or Decimal for example. With this approach, more intelligent queries according to the site column data type as range queries cannot be performed. Here are some examples of queries cannot be performed with these automatically created managed properties:
Date based query example #1: SiteColumnNameOWSDATE>1/1/2018
Date based query example #2: SiteColumnNameOWSDATE>1/1/2017 AND SiteColumnNameOWSDATE<1/1/2018
Number based query example #1: SiteColumnNameOWSNMBR>1000
Number based query example #2: SiteColumnNameOWSNMBR>500 AND SiteColumnNameOWSNMBR<1000
If we need to make queries with the same type as the corresponding site columns, the current solution is to use Refinable managed properties (there is a limited number of available Refinable managed properties, depending on its type). There are here very limiting numbers like 10 RefinableDecimal managed properties or 20 RefinableDate managed properties.
I understand that there have to be limitations on the amount of freedom each tenant or farm can have to change the search schema (because of stability/scalability/performance) but I also believe that having automatically created managed properties to be generated with the same data type or an inferred type from their corresponding site columns, would make SharePoint Search a much better solution without the current limitations since automatically created managed properties would be created with the data type developers and users want to query data and would allow both users to find the information they want and developers to build better search based solutions, making more intelligent search queries and taking full advantage of the queries that each data type supports (imagine a database with a column of type number where we cannot make a range query like column > 0 or column < 100 for instance, it just doesn't make sense).
Here are some advantages if automatically generated managed properties are created with the same data type or an inferred type from their corresponding site columns and not always as text:
• Users and developers would be able to make all types of search queries the data type of the managed property supports
• Assuming users want to search the information they create and developers want to build solution to search data users create, virtually there would be almost no need to map automatically created crawled properties with existing Refinable managed properties because automatically created managed properties would have the type users want to query
• This change would not bring more load on search and would prevent developers to need to create new managed properties or manually map their crawled properties with Refinable managed properties because the managed properties they need are automatically created by SharePoint
• The number of Refinable managed properties could be reduced since developers resort to these managed properties because automatically created managed properties don't have the data type they need
If changing the existing managed properties can lead to compability issues, instead of changing the existing managed properties, I ask you to add additional automatically generated managed properties that are created with the same data type or an inferred type from their corresponding site columns.
Ricardo Costa commented
If we want to build a search solution this is a "must have". How can I search for properties other then text? Cannot understand how this limitation exists.
Miguel Isidoro commented
Just Now · Delete
This is really a very important issue. Because of this, in this customer we are evaluating the usage of Amazon Search in this solution. Not that we want to but because of this important limitation. Can Microsoft give feedback if this willl be addressed and when?
Yes. I am agree with Miguel.it would be helpful for all.
Beau Cameron commented
I like the idea and I believe it will make it much easier to build search solutions in SharePoint. I would really like to know why the functionality isn't there (I believe it was in 2010), so if Microsoft could provide some input on this, that would be great.
When building search solutions, it's a fairly large obstacle to ask customers (IT admins) to keep track of and manage this type of content.
Stacy S commented
Nicely done, Miguel!