Try our conversational search powered by Generative AI!

Issue with catalog search

Vote:
 

I have setup catalog search with the LuceneSearchProvider:


    
  

I have built the index through commerce manager, which only generates one file: catalog.build

When I try to search I get 0 hits. In the log file I find the following error:

ERROR EPiServer.Commerce.Shell.Search.ProductSearchProviderBase: Error when processing search product catalog query
System.IO.FileNotFoundException: no segments* file found in Lucene.Net.Store.SimpleFSDirectory@ lockFactory=Lucene.Net.Store.NativeFSLockFactory: files:catalog.build
at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\SegmentInfos.cs:line 736

I found an old post from 2012 regarding the topic:
https://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=56915

I am running Episerver.Commerce 11.2.4

#187318
Edited, Jan 19, 2018 8:39
Vote:
 

Ok, found the problem.

The Lucene Provider has a setting called storage, which is often combined with basePath. Here is what I got working:

Mediachase.Search.config manger site:

Mediachase.Search>
  <SearchProviders defaultProvider="LuceneSearchProvider">
    <providers>
      <add name="LuceneSearchProvider" type="Mediachase.Search.Providers.Lucene.LuceneSearchProvider, Mediachase.Search.LuceneSearchProvider" 
           queryBuilderType="Mediachase.Search.Providers.Lucene.LuceneSearchQueryBuilder, Mediachase.Search.LuceneSearchProvider" 
           storage="[appDataPath]\Search" simulateFaceting="true" />
      <add name="LuceneAzureSearchProvider" type="Mediachase.Search.Providers.Lucene.LuceneAzureSearchProvider, Mediachase.Search.LuceneAzureSearchProvider"
           queryBuilderType="Mediachase.Search.Providers.Lucene.LuceneSearchQueryBuilder, Mediachase.Search.LuceneSearchProvider" storage="indexcontainer"
           connectionStringName="EPiServerAzureBlobs" simulateFaceting="true"/>
    </providers>
  </SearchProviders>
  <Indexers basePath="..\appdata">
    <add name="catalog" type="Mediachase.Search.Extensions.Indexers.CatalogIndexBuilder, Mediachase.Search.Extensions" />
  </Indexers>
</Mediachase.Search>

Mediachase.Search.config web site:

<Mediachase.Search>
  <SearchProviders defaultProvider="LuceneSearchProvider">
    <providers>
      <add name="LuceneSearchProvider" type="Mediachase.Search.Providers.Lucene.LuceneSearchProvider, Mediachase.Search.LuceneSearchProvider" 
           queryBuilderType="Mediachase.Search.Providers.Lucene.LuceneSearchQueryBuilder, Mediachase.Search.LuceneSearchProvider" 
           storage="C:\Projects\MyProject\src\MyProject.Manager\App_Data\Search" simulateFaceting="true" />
      <add name="LuceneAzureSearchProvider" type="Mediachase.Search.Providers.Lucene.LuceneAzureSearchProvider, Mediachase.Search.LuceneAzureSearchProvider"
           queryBuilderType="Mediachase.Search.Providers.Lucene.LuceneSearchQueryBuilder, Mediachase.Search.LuceneSearchProvider" storage="indexcontainer"
           connectionStringName="EPiServerAzureBlobs" simulateFaceting="true"/>
    </providers>
  </SearchProviders>
  <Indexers basePath="..\appdata">
    <add name="catalog" type="Mediachase.Search.Extensions.Indexers.CatalogIndexBuilder, Mediachase.Search.Extensions" />
  </Indexers>
</Mediachase.Search>

So If the index is inside app data folder on manager site, the web site config need to refer to the full path. In Azure this will not be an issue as indexed is stored as a blob.

#187326
Jan 19, 2018 11:29
Harinarayanan - Jan 05, 2023 11:26
Hi, I'm facing exactly the same problem, and applied the above fixes, but still getting the same error. Is there any other key points I should check.. Thoughts and comments will be helpful,

Thank you,
Hari
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.