Try our conversational search powered by Generative AI!

Cannot find categories in Search

Vote:
 

Hi,

I am on EPiServer Commerce 7.11.
Through Commerce->Catalog within the catalog tree a search box is provided to find the products. I am wondering I cannot find te categories. Products and Variants are working fine.
I tried to find categories by Display Name and code.
Display name have following attributes set as true(Allow searc, Tokenize, Include In Default search).

(My first assumption is that is based on Luscene Index and on rebuilding index categories are not indexing.)


Regards

Khurram

#111673
Oct 17, 2014 12:46
Vote:
 

Hi,

I'm quite sure that we don't include categories/catalog node in search results.

The reason might be the number of node is not very high so an SQL query can be good enough - for example if you find node by code there method such as GetCatalogNodeDto for doing that. (The decisions were made long before I joined EPiServer and I just guess here)

Regards.

/Q

#111677
Oct 17, 2014 13:06
Vote:
 

Thanks Quan,

I also thinks same as we can't find those through comeerce manager also. I have a requirement where we have authors(as category) in hunders and Client wnat to search them by some SAP-ID(Property of a category) to edit. Can I hook/replace that search provided in Commerec->Catalog Tree

Regards
/K

#111679
Oct 17, 2014 13:12
Vote:
 

Which is version you're working on? Prior 8.0 there's no easy option (not I know of), but from 8.0 you can simply write a SearchProvider (just like LuceneSearchProvider) and use it as your default search provider.

Regards.

/Q

#111691
Oct 17, 2014 14:23
Vote:
 

I am on 7.11 at this time but will update to 8 on this monday, Your Idea seems me interesting, Can you please ellaborate a little more. I will definatly give it a try.
Regrads
/K

#111698
Oct 17, 2014 15:16
Vote:
 

Your requirement seems to be able to search for both entries and categories in the Catalog Entry Search screen in Catalog Management menu, right?

I would suggest to create a new SearchProvider, which should inherit from LuceneSearchProvider. IIRC we don't open source that project, but you only need to override this method:

ISearchResults Search(string applicationName, ISearchCriteria criteria)

then join your search results from your search and Lucence search.

I must admit I did not try this. This is the idea comes to my mind which I think will work :).

Regards.

/Q

#111714
Oct 18, 2014 5:16
Vote:
 

Where is my edit button ...

- You need to inherit from LuceneSearchProvider if you are using Lucene, or SolrSearchProvider if you're using Solr - you get the idea

- After creating your search provider you'll need to register it Mediachase.Search.config in Config folder

/Q

#111715
Oct 18, 2014 5:23
Vote:
 

Thanks Quan, I got the Idea, In theory it should work. I will give it a go if RFC approved, I will close this thread as answered.

Regards
/K

#111727
Oct 20, 2014 11:01
* 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.