There is a frequent requirement for business users to search for the documents/contents based on the custom metadata information being managed for their business documents. To facilitate the user for selecting the values for the search properties, the OOTB advanced search web part provides only a plain text box, for the selected property. Hence, the user needs to know or remember the value of the property they are looking for, which is a kind of usability issue for the business users. Hence, to provide a effective UI for the users to search based on the custom metadata values, the OOTB advanced search web part can be customized to an extent thro’ which this can be achieved.
Limitations in the OOTB advanced search web part:
Screenshots:1. Custom Advanced Search Web Part UI
2. Tool Part for the above web part Search Attribute Reference
Advanced Search UI constructs and the passes the keyword and property filters using the following attributes:
The property filters can be specified using the ASB_PS_… attributes and along with the ASB_ResType_Query attribute, in which both conjuncts and forms the search query. The limitation with using the ASB_PS_… attributes are, the multiple values for the same property is not supported by single occurrence of this property. Hence, either it needs to be a different occurrence of the ASB_PS_… attribute with the same property filter name. The alternate way of achieving the support for multiple values is using the ASB_ResType_Query to form the whole property query. But, the datetime values being passed in the property query using ASB_ResType_Query, expects a special format, which I’m still struggling to find out. Will update this post, once when I find the format.
Thanks to Tom Clarkson, from whose blog I got to know about the Search Query Attributes.
Tom Clarkson’s Blog on Custom Advanced Search