We are using Commerce 8.x and that is configured to use lucene as search provider for catalog search. On one of our client environment the search fails to return anything back and the error
ERROR Mediachase.Search.SearchManager: Search failed.
Lucene.Net.Store.NoSuchDirectoryException: directory 'C:\zzzzzz\App_Data\Search\ECApplication\ECApplication\catalog' does not exist
and eventually it fails with the following error
EPiServer.Business.Commerce.Providers.ProductSearchProviderBase: Error when parsing search product catalog input query
System.NullReferenceException: Object reference not set to an instance of an object.
The config mentioned is config from episervers' media chase and not picking the one from commerce websites, any clues why?
Make sure you have correct configuration in front-end website\Configs\Mediachase.search.config. Sounds like the path for saving the index data was wrong.
When you say front end, can you please detail more?
We have Episerver website and commerce website which are hosted seperately. Both has Mediachase configs in the configs folder.
Both are configured to use basepath
For Commerece as shown below
<add name="catalog" type="Mediachase.Search.Extensions.Indexers.CatalogIndexBuilder, Mediachase.Search.Extensions" />
However, the episerver one is configured to a different path, now when I serach something on commerce catalog from episerver UI, the error is thrown showing the path is not found though I am searching catalogs.
It's the CMS site, some people refer it as front-end site, as opposed with backend/Commerce Manager.
What is the appDataPath for your CMS site?
@Rams: For an example of config setup, see: https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2018/1/issue-with-catalog-search/
@Quan the app path for the CMS is the one tha is erroring. Which is shown on the intial post.
@Mari, Thanks for stepping in, will give it a go.
I think I understand the problem now. because you have two different paths for CMS and Commerce Manager, so there was no index for CMS site to use. best practice is usually to have them point to a shared path. Otherwise you would need to run the "Full Search Index" job to index on CMS site.