SaaS CMS has officially launched! Learn more now.

Search in Catalog with Mediachase.Search

Vote:
 

Hi Team,

Please help on below of my query.

I am trying to implement Mediachase.Search functioanlity for Catalog, using below code for that but I am getting 0 items in response.

Can someone please check my ocde and help me asap to implement this functioanlity.

SearchManager searchManager = new SearchManager(AppContext.Current.ApplicationName);
searchManager.BuildIndex(false);

CatalogEntrySearchCriteria criteria = new CatalogEntrySearchCriteria();
criteria.SearchPhrase = "Electrolux Catalog";
SearchManager manager = new SearchManager(AppContext.Current.ApplicationName);
var result = manager.Search(criteria);

Regards

Om

#183455
Oct 15, 2017 11:34
Vote:
 

Please  note that "Electrolux Catalog" is the calalog name in my prpject.

#183456
Oct 15, 2017 11:35
Vote:
 

CatalogEntrySearchCriteria has a property CatalogNames. If you want to search within "Electrolux Catalog", then you have to add it to CatalogNames, instead of setting it to SearchPhrase 

#183549
Oct 17, 2017 12:39
Vote:
 

Tried with this code also but no luck. Can someone help me on this?

criteria.CatalogNames.Add("Electrolux Catalog")

Thanks

Omendra

#183550
Oct 17, 2017 12:45
Vote:
 

Try setting the following

criteria.Locale = "en"
criteria.MarketId = market.MarketId,
#183570
Oct 17, 2017 18:29
Vote:
 
<p>Thanks,&nbsp;this solutions is working for me :)</p>
#184448
Oct 27, 2017 11:07
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.