cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to disable or remove category and associated product from solar search

Former Member
0 Likes
1,965

Hi All ,

I have one doubt regarding solar search.

Actually i want to disable category and associated product from solar search.

Means one category and related product not able to search though search box .

But i don't have any idea how i can do that ? .....

Please suggest anyone if possible ......

Regards,

Satish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Satish

Compare 2 screenshots that I have attached. I hope this is what you want.

I just added the fl query parameter for convenience, you can omit it. Basically you can use the

fq=-category_string_mv:'your-category-code'
minus sign after '=' is important here.
Former Member
0 Likes

Hi Saurabh , Currently able to find that category in my solar as you also shows in Image .

But my question is still confused....is there any ways i can remove that category from here as you shown in pic or i have to follow above process suggested by "Hemant" .

Please suggest on this .....

Regards,

Satish

Answers (7)

Answers (7)

Former Member
0 Likes

Hi Marko,

Thanks for your suggestion .

Could you please guide me how i can assured in my project search restriction is using or not .

Where i can see configuration regarding this ?

Currently i'm using hybris 6.3 version .

Regards,

Satish

Marko_salonen
Contributor
0 Likes

Sorry, i missed this one. You can do this in backoffice. Go to System --> Personalization. I think it is called Frontend_RestrictedCategory. See if this one is activated.

Former Member
0 Likes

Hi Marko ,

Thanks for your suggestion .

So if i did this process , that category won't be come in PLP Page .....is it correct ?

Regards,

Satish

Marko_salonen
Contributor
0 Likes

Yes, then the category should disappear from the listing page. It might be that if you don't have the search restriction activated and do step 1, that you would need to remove the category from the navigation nodes as well. OOTB all categories are shown and it does not check if category has products or not, this is on the storefront.

Marko_salonen
Contributor
0 Likes

This way it should be hidden anyway , for the first one it works if you have searchrestriction that restricts categories for customers if customeGroup is not added as visible group.

Former Member
0 Likes

Yes Correct .

I don't want to index one particular category .

http://localhost:8983/solr/#/master_xxx_Product_default/query.....

Whenever i hit the above url , that particular category won't be come for searchable or hide from query ....

Please suggest more on this .?

Regards,

Satish

Marko_salonen
Contributor
0 Likes

Is it so that you don't want to index this category?

Former Member
0 Likes

Hi Saurabh , Currently able to find that category in my solar as you also shows in Image .

But my question is still confused....is there any ways i can remove that category from here as you shown in pic or i have to follow above process suggested by "Hemant" .

Please suggest on this .....

Regards,

Satish

Former Member
0 Likes

You can add that category as filter, category !="YOUR_CATEGORY". For this create one listener whichc extends FacetSearchListener and override the query in before search method.

Former Member
0 Likes

Hi Hitesh ,

I go through your suggested solution also.

So like below we have to do .............

@Override

  public void beforeSearch(final FacetSearchContext facetSearchContext) throws 


`FacetSearchException

  {
      final SearchQuery searchQuery = facetSearchContext.getSearchQuery();

}

So here i have to override the query .......

Please could you tell me more how to override the query to avoid category .

Regards,

Satish