If you think the ‘ALL’/’EXACT’ search types are too restricting and that ‘ANY’ search type returns too many result. Minimum match gives you the option to control how many search terms match the product’s indexed fields. And phrase slop is used to boost up products with fields indexed closer to each other.
Minimum match gives you more flexibility in terms of specifying how many of the search keywords need to match the indexed documents. As an example, if user enters 2 search keywords and you set minMatch = 2 that means the indexed fields of the returned documents need to contain both keywords. If you set minMatch = 2<80% 6<50% That means if there are less than 3 query keywords, both have to be found in the document; if it's between 3 and 6 query keywords (inclusive) , then 80% needs to match - for example user searches for 3 keywords, 80% of 3 is 2.4 and rounding down it down to 2, so results matching at least 2 of the 3 entered words will be returned, if more than 6 keywords, 50% of the keywords need to match in the document. Some examples of how to set the parameter: http://lucene.apache.org/solr/4_8_1/solr-core/org/apache/solr/util/doc-files/min-should-match.html
First, it needs to be configured with the ‘ANY’ search type to enable minimum match to offer the behavior in between the behaviors offered by the out-of-the-box ‘ANY’ and ‘AND’/’EXACT’ search types, as described above.
Phrase slop (ps): How far apart the search terms are indexed in the document influence the relevancy. For example, for a search term ‘badman movie’, by setting ps = 2 will make ‘badman movie’ more relevant than ‘badman is the name of a movie’. Phrase slop defines the amount of slop on phrase queries built for "pf" (phrase fields) fields.
In FEP 8, for minimum match and phrase slop, we first check if they are defined in the url; if not, we check at the profile level (wc-search.xml); if they are not defined in the profile level, then we default it to what's defined in the wc-component.xml file (default minMatch = 1 and ps = 100)
There are two options to change these values: from the UI (for entire profiles) or using wc-search.xml (for specific profile):
Option1 - From the UI:
In SearchSetup.jspf file, add in the parameter value, as shown in the screen shot below:
Save the change.
In order for changes in the jsp/jspf files to show, customers need to delete all contents under the pre-compiled directory, located at (for example):
If they are using jsp/jspf caching, then they need to either clear the cache or restart WC server. Please note that this way, it’ll be applied to all profiles for structured contents. If you would like to apply it to the un-structured contents, you will need to add it to the SearchConentSetup.jspf file, under the “catalogNavigationView” section.
Option 2 - If you want this to be profile specific, you can add them to the wc-search.xml (located at com.ibm.commerce.catalog-ext folder) file. You will need to inherit from the IBM_findProductsBySearchTerm profile. As shown below
Then you will need to add it to the searchSetup.jspf file
And also the wc-rest-resourceconfig.xml file, under Search-Rest/Web-INF/config/com.ibm.comerce.rest folder:
Please note that the limitation on minimum match is discuss in this post: https://www.ibm.com/developerworks/community/blogs/CommerceSearch/entry/enable_minimum_matching_in_fep_6_through_the_ui?lang=en#comment-1416322269275