This is a test server to see if it works. I do not have any SharePoint servers in my site.
I host several websites and would like to add a site search to them. After some reading I found that SP2013 Foundation is the replacement for Search Server 2010, which is what MS recommends since they removed the Index service from Windows.
Following the very few posts available for anonymous search using the rest api, I have configured the server as described -- Web Application (SharePoint - 80) Authentication Providers Default Enable anonymous access ON, Require Use Remote Interfaces permission OFF. Root web site settings Anonymous Access Entire Website. Used AnonymousRESTSearch.ps1 to create the QueryPropertiesTemplate folder and queryparametertemplate.xml file. Verified they have anonymous access.
When doing a query from the SP server I get results. When doing a query from my PC (http://server/_api/search/query?querytext='contact'&QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml') I get a HTTP 500 error with the following xml returned:
<?xml version="1.0" encoding="utf-8"?>
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-1, Microsoft.Office.Server.Search.REST.SearchServiceException</m:code>
<m:message xml:lang="en-US">An unknown error occurred.</m:message>
</m:error>
I have even added some CORS properties to the IIS 8.5 site to see if that would help, but nothing has worked so far. I have no idea where to go from here and appreciate any help I could get.
http://server/_api/search/query?querytext='contact'
work correctly? Also you could enable verbose logging on 'Query' category of the 'SharePoint Server Search' to see what's the matter. Also, did you follow this guide: msdn.microsoft.com/en-us/library/office/…