Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Anders Hattestad
Feb 9, 2016
  4052
(3 votes)

When EPiServer.Search dosen't work

I work locally and move the site to a test server, and the search didn't work.
The first problem was the http://IndexingService/IndexingService.svc gave an 500 error since it didn't find the handler for it. That was easy resolved by adding svg-Itegrated-4.0 handler.

  <location path="IndexingService/IndexingService.svc">
    <system.web>
      <httpRuntime maxQueryStringLength="65536" />
    </system.web>
    <system.webServer>
      <handlers>
        <clear/>

        <add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />

      </handlers>
      <security>
        <requestFiltering>
          <requestLimits maxQueryString="65536" />
        </requestFiltering>
      </security>
    </system.webServer>
  </location>

But the problem was there still. I got no hits from the search. I thought it maybe was something that would show in the log, but the log didn't add any lines. That was solved by editing the EPiServerLog.config and set the threshold for the appender to All since it by default is set to Error.

<log4net>
    <appender name="errorFileLogAppender" type="log4net.Appender.RollingFileAppender" >
        <!-- Consider moving the log files to a location outside the web application -->
        <file value="App_Data\EPiServerErrors2.log" />
        <encoding value="utf-8" />
        <staticLogFileName value="true"/>
        <datePattern value=".yyyyMMdd.'log'" />
        <rollingStyle value="Date" />
        <threshold value="All" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
        <appendToFile value="true" />
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date [%thread] %level %logger: %message%n" />
        </layout>
    </appender>
    <appender name="outputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender" >
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="[%thread] %level %logger: %message%n" />
        </layout>
    </appender>
  <!-- Log page publish to find editor related errors. -->
  <logger name="EPiServer.Search.IndexingService">
    <level value="All" />
  </logger>

  <root>
        <level value="Error" />
        <appender-ref ref="errorFileLogAppender" /> 
    </root>
</log4net>

But my zero hits didn't show in the log, or it showed that the index was responding, but gave 0 hits. Then it struck me that to get the index to work I need to copy the AppData/Index files to the new server. And it worked. So mental not to self, when deploying a local site to a test server copy the AppData/Index files also, or reindex the site again

Feb 09, 2016

Comments

Feb 9, 2016 04:25 PM

Forgetting to map up domain name in host file is another got ya. 

Ip filter that disallow localhost is a third I've bashed my head against  :)

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog