This post is a contribution from Chanchal Jain, an engineer with the SharePoint Developer Support team.
If you have a SharePoint Server installation and you have the SharePoint Search Application configured, you’ll be able to perform search in the SharePoint Search box. However when you perform a Search in the CMIS Consumer web part’s Search box, it’ll say no results returned unless your SharePoint site is already crawled by the Foundation Search. Yes that’s the default behavior.
The reason behind is CMIS Connector uses the SharePoint Foundation Search assembly to do search on SharePoint. (You read it correct!!). CMIS Connectors are not supported for SharePoint Foundation 2010. Refer SharePoint 2010 Administration Toolkit (SharePoint Server 2010).
So, assuming you haven’t already provisioned SharePoint Foundation search in your SharePoint farm, how do you make the CMIS Consumer web part search results working?
For CMIS Consumer Search to work, your site should be crawled by the SharePoint Foundation Search service. SharePoint does not provide any GUI to configure SharePoint Foundation Search which becomes “SharePoint Helper Search” in a Server Installation. Here’s are the steps to get your site crawled by SharePoint Foundation search:
If you have followed the above steps religiously, both your CMIS Consumer Search will start giving results as well as your code with contains query will start giving results.
NOTE: In case you are using search query to retrieve data from SharePoint 2010 using CMIS CONTAINS predicate and not getting search results back, the above steps could help too.
Even after performing the above steps if your code is unable to query SharePoint repository using the CMIS APIs the last thing you need to check is that in the imported project the URL of the web service is not that of FQDN name of server or Alternate Access mapping URL of the site.
e.g. your Site is hosted as http://Server:Port and the FQDN URL for the site is http://Server.Domain.com:Port and the Alternate Access Mapping URL is http://alternateurl.domain.com.
Your Service reference and the related configuration files in the code project should have the URL that you had added in the Content Source. i.e. http://Server:Port.
Hope this help the CMIS enthusiasts to connect to SharePoint!!!