I am getting error "Sending a request to the Search Engine at http://localhost:8983/tridion failed with the following response: The connection can not be authenticated." while executing the following code:
SearchQueryData filter = new SearchQueryData(); filter.Author = new LinkToUserData() { IdRef = "tcm:0-11-65552" }; filter.ItemTypes = new ItemType[] { ItemType.Component,ItemType.Page}; XElement results = client.GetSearchResultsXml(filter);
I have checked the User is added to the SDLSearchUsers group and same has been configured in MMC Settings.
Please find below the code block along with connection to core service
ChannelFactory factory = new ChannelFactory("basicHttp_2013")
NetworkCredential networkCredential = new NetworkCredential("Username", "password", "domain"); factory.Credentials.Windows.ClientCredential = networkCredential;
ICoreService client = factory.CreateChannel();
SearchQueryData filter = new SearchQueryData(); filter.FullTextQuery = "Home"; IdentifiableObjectData[] resultSearchData = client.GetSearchResults(filter);