"The site is not assigned to an indexer" error in SharePoint custom search
Strangely enough! We'll not see this issue with an OOTB search. It is seen only when we use search APIs or web service and perform a custom search.
Apparently, when we use Microsoft.Office.Server.Search, the content database also gets indexed and this content database should be assigned to the particular site we are searching against.
The way you do this is by going to SharePoint Central Administration site > Application Management > Content Databases > click the content database in the list.
And make sure the Search Server is assigned.