Forum Discussion

tmarshall's avatar
tmarshall
Advisor
9 years ago

Limit Search by Category

Hi,

 

We would like to limit search by category. Has anyone implemented this type of limitation so the Lithium Community search only searches a specific category instead of the entire community.

 

Thanks,

Tim

 

cc: KristinaV

  • tmarshall - Yes, you can. Here is the document to configure this. Once implemented, the search will be limited to the current node.

     

    Search V 1.0 settings are configured in Community Admin > System > Search> Search 1.0. Be sure that Search 2.0 is disabled in the Search 2.0 tab, if visible.

    In the Page tab XML View you can configure the component to hide the drop down list that enables uses to choose the scope of their search, to display an Advanced Search link that takes the user to the Search Page that includes filtering options, to use a slim or wide display model, and to default the scoping options to a Community-level scope.

    Search V1 supports the parameters: showAdvancedSearchLink, hideGranularity, and defaultToCommunity. Search V2 supports the parameters: mode, hideGranularity, defaultToCommunity

    1. To hide the drop down list to scope the search add: hideGranularity="true"
    2. To show the Advanced Search link add: showAdvancedSearchLink="true"
    3. To default the scope of the search to be community-wide add: defaultToCommunity="true"
    4. To change the component width, add: mode="slim" or mode="wide"
    • tmarshall's avatar
      tmarshall
      Advisor

      Hey VarunGrazitti

       

      Thanks for the reply. I followed the pathway and do not see the 'Search 1.0' option. I reached out to Lithium support, and they responded that "Search 1.0 was barely used and and never received any recent improvements or fixes, so the decision was made to deprecate it a few releases ago in favor of making 2.0 the standard default search."

       

      Do you have an alternate method to be able to limit search by category using Search 2.0? I will continue to try and understand if I can limit search, but if you have further suggestions that would be super.

       

      Thanks,

      Tim