Seems that you are having problems with your EPiServer Find solution. Have you configured it correctly in your config? Is there a firewall that is blocking your request somewhere on the way?
Have the indexing gone correctly? Did you run the scheduled job? I would need some more information
Also it would make more since in my opinon to write the code like below, where you use the Content type and it's typed data:
var result = client.Search<Content>()
.For(Query).InAllField().Select(x => new SearchHit { Title = x.PageTitle ,Text = x.PageTitle ,Url = x.LinkURL }).GetResult();
Hi,
From the ip it seems like your dns has correctly resolved es-api01.episerver.com. If you open your browser and go to http://es-api01.episerver.com/ from your development machine do you get a response telling:
{"status":200,"message":"Welcome to the EPiServer Find Proxy!"}
/Henrik
Henrik,
I get a Find-Save-Cancel window on accessing the URL from my development machine. On saving and opening it using a notepad, I can see the message:
{"status":200,"message":"Welcome to the EPiServer Find Proxy!"}
Kindly let me know what needs to be done to have it working.
Marcus,
I believe the code that you have suggested will work only when Page Types are build using Page Type Builder, as I don't get the properties - PageTitle, LinkURL on "x." intellisense and I have created the Page Type through admin mode.
/Rajesh B
In you config you are not using http://217.114.87.70:80/yourkey? You have to use the dns name http://es-api01.episerver.com/yourkey
/Henrik
Henrik,
I already have the entry as you mentioned and whose format is as below:
<episerver.find serviceUrl="http://es-api01.episerver.com/<mykey>/" defaultIndex="<myindexname>"/>
However, I get the mentioned error: “no connection could be made because the target machine actively refused it 217.114.87.70:80”.
/Rajesh B
Henrik,
Also I get 'HTTP 403 Forbidden' error on accessing the URL - http://es-api01.episerver.com/<mykey>/
/Rajesh B
You should get a 403 when accessing http://es-api01.episerver.com/<mykey>/ (it is simply not a valid request, just the root url for the service)
As for your error please verify that your local firewall is not blocking requests (espicially from the w3wp.exe service (IIS)) or that you are using a proxy for the IIS that might block requests. One simple way to test this is to run the following console application and see if you get the same error:
using EPiServer.Find;
namespace ConsoleApplication
{
class Document
{
public string Title { get; set; }
}
class Program
{
static void Main(string[] args)
{
var client = new Client("http://es-api01.episerver.com/mykey/", "myindex");
var result = client.Search<Document>().GetResult();
}
}
}
/Henrik
Henrik,
I did run code in a console application which ran without any error. However the same code doesn't run in my web application. I believe the local firewall is blocking this, as you said. How do I bypass the firewall for this request and make this work? Thanks.
/Rajesh B
Depending on your firewall vendor that might differ considerably. Your best call is to locate your firewall and vendor and try to google it. There is no way to bypass your firewall by code in your application.
The only access Find needs is TCP to es-api01.episerver.com:80.
/Henrik
Henrik,
How do I associate the proxy to the client object so that the http requests are routed through the proxy. Thanks.
/Rajesh B
The client uses the standard HttpWebRequest.DefaultWebProxy, that complies to your defaultProxy settings in the web.config http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx.
/Henrik
Hi,
I have a free text search method as following:
private void Search(){var result = client.Search<Content>().For(Query).InAllField().Select(x =>newSearchHit { Title = x.GetType().GetField("PageTitle").ToString(),Text = x.GetType().GetField("PageTitle").ToString(),Url = x.GetType().GetField("LinkURL").ToString()}).GetResult();}
where SearchHit is a custom model class with the properties - Title, Text and Url.
However, on execution of this code I get an error : “no connection could be made because the target machine actively refused it 217.114.87.70:80”.
Can any one let me know what might be the reason for this and how to fix it. Thanks.
Regards,
Rajesh B