Start a new topic
Answered

search using Elastic Search server failed

Usually exception looks like:


Inline image 1



The main error here is "search using Elastic Search server failed". So it needs to check what is wrong with Elastic search engine. Most often problem is incorrect scope name. Check its name in "SearchConnectionString" setting defined in file App_Data\Virto\Configuration\connectionStrings.local.config. Please also send us that setting to investigate the problem. So normally scope name should be simple lowercase one word text without any special characters. If it not so, change it. It requires to rebuild search index after changing search settings. Please read here: http://docs.virtocommerce.com/display/vc1userguide/Search+Settings



Another option would be to select Lucene search provider instead of Elastic search. Just remove "SearchConnectionString" setting in file App_Data\Virto\Configuration\connectionStrings.local.config (Lucene search provider is used by default). Or choose it by creating new project in wizard step 3:



Best Answer

port 9200 is correct. This port is used by elastic service, it is not a port of web application. But I see there is a point in scope name: "scope=sampleproject1.8". This will be fixed in next release. Now just change it to "scope=sampleproject18" and rebuild search index (http://docs.virtocommerce.com/display/vc1userguide/Search+Settings)



my App_Data\Virto\Configuration\connectionStrings.local.config.:

<?xml version="1.0" encoding="utf-8"?>

<connectionStrings>

  <add name="VirtoCommerce" connectionString="Server=DELL-TOUCH\MSSQLSERVER2008R;Database=SampleProject1.8;Integrated Security=True;Connection Timeout=30;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />

  <add name="SearchConnectionString" connectionString="server=http://localhost:9200;scope=sampleproject1.8;provider=default" />

</connectionStrings>


but my installed port is 2580, then  i change connectionString:

connectionString="server=http://localhost:2580;scope=sampleproject1.8;provider=default" /> 

 brows again, I get 404 error,  not 500 error:


The remote server returned an error: (404) Not Found.

....

Line 13: @Html.Action("SearchResultsWithinCategory", "Search",

....


 

Answer

port 9200 is correct. This port is used by elastic service, it is not a port of web application. But I see there is a point in scope name: "scope=sampleproject1.8". This will be fixed in next release. Now just change it to "scope=sampleproject18" and rebuild search index (http://docs.virtocommerce.com/display/vc1userguide/Search+Settings)


Now I install second, I try other option, I choose Lucene, then install success.


So, I guess in my first installation, have one dot in the name:SampleProject1.8, then I install third, I named:


 SampleProject18a


then install success.

thanks, the problem is a point in scope name

Login or Signup to post a comment