In addition to understanding and leveraging the basics of search tokens and search properties to return more accurate Vault searches (see Searching a Vault), administrators can also manipulate the "range" of Vault search results users receive by modifying the Lucene "search slop factor" in the web.config file.
The "search slop factor" determines how many positions can occur between any two terms in your search phrase and still be considered a match. These positions range from an exact match of your search string to a number of combinations of this string.
The "slop" is an edit-distance, where the distance units are the number of moves the tokens in the query phrase can shift out of position and still be captured in the search. For example, to switch the order of two words in your search requires two moves. The first move places the words atop one another, and the second move re-orders them. So, to permit re-orderings of search strings with two words or tokens, the slop must be set to at least 2.
In simple terms, the slop factor decides how out of order search tokens are permitted to be before they are excluded from search results. By default more exact matches are given precedence, but the total number of search results can be directly affected by this value.
From the Web.config file (C:\Program Files\Autodesk\ADMS Professional 20xx\Server\Web\Services), locate the following two lines:
!-- slop factor provided to lucene search --> <add key="SearchSlopFactor" value="10" />
By default the slop value is set to 10. You can set this value as low as 0 for exact matches only or increase this range to whichever value you desire.
Example 1: Searching with Multiple Tokens
If I enter A-055* as my search criteria and the slop factor is set to 10, I receive any number of additional results similar to the following which meet the slop factor settings:
If I enter A-055* as my search criteria but the Slop Factor = 6, the exact same results are returned because the tokens are still within the "edit distance" set by the slop factor.
However, if I enter A-055* as my search criteria but the Slop Factor = 4, the results are reduced to 5. The reason I no longer get B-055401-321.ipt in my results is because the tokens in B-055401-321-A.ipt are spread too far apart to meet the slop restriction or edit distance. Starting from the first dash we would have to move "A" 5 positions to match A-055*.
If I enter A-055* as my search criteria but the Slop Factor = 2, there are only 4 results.
B-321-055401-A.ipt is omitted as the "A" would need to move 3 positions to match the search phrase A-055*.
Finally, if I enter A-055* as my search criteria but the Slop Factor = 0, only exact token matches are returned.
Example 2: Searching with Fewer Tokens
What happens if I repeat the search with fewer tokens? This time I will search for A055*.
If I enter A055* as my search criteria with Slop Factor = 5, I receive 6 results because I have effectively reduced the number of positions required to move the tokens for a match. The slop factor does not need to be as high to return 6 results:
If I enter A055* as my search criteria with Slop Factor = 3, I receive 5 results. Once again, the edit distance is shorter than it was in the previous example, but the results are the same with B-055401-321-A.ipt being excluded:
If I enter A055* as my search criteria with Slop Factor = 1, there are only 2 results.
However now with the "-" character removed, my search for file names containing A055* with Slop Factor = 0 yields NO results–there are no exact matches in this case.