Changing the default search type
The search type controls the search scope of different catalog entry types to be searched
and displayed in the storefront. It also controls the search operation that is used for multiple
keyword search terms such as the
AND
operator, OR
operator, and
exact match.
About this task
The default search type is 1000:
ANY (INCLUDE products, kits, bundles, category level
SKUs, EXCLUDE product level SKUs).
It can be set in the following locations:- In the search profile, which sets the default value and results in all REST requests to use the same value that is set for the profile.
- In the REST request, which overrides the default value, and any other value set at the profile level.
Procedure
-
Determine which search type you want to set by using the following table as a reference:
Option Description 0 ANY (EXCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)
1 EXACT (EXCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)
2 ALL (EXCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)
3 NONE (EXCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)
10 ANY (INCLUDE products, product variants, kits, bundles, product level SKUs, category level SKUs)
11 EXACT (INCLUDE products, product variants, kits, bundles, product level SKUs, category level SKUs)
12 ALL (INCLUDE products, kits, product variants, bundles, product level SKUs, category level SKUs)
13 NONE (INCLUDE products, product variants, kits, bundles, product level SKUs, category level SKUs)
100 ANY (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)
101 EXACT (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)
102 ALL (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)
103 NONE (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)
1000 ANY (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants) 1001 EXACT (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants) 1002 ALL (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants) 1003 NONE (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants) 10000 ANY (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants) 10001 EXACT (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants) 10002 ALL (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants) 10003 NONE (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants) 20000 ANY (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs) 20001 EXACT (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs) 20002 ALL (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs) 20003 NONE (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs) 20010 ANY (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs) 20011 EXACT (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs) 20012 ALL (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs) 20013 NONE (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs) Note:- ANY = combine search keywords with logical OR.
- ALL = combine search keywords with logical AND.
-
To change the default search type in the search profile:
-
To override the default search type in the REST request:
-
To change the default search type in the search wc-component.xml
configuration file: