Fine-Tune Searches with the Search Slop Factor

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.

Configure the Slop Factor

  1. From the Web.config file (C:\Program Files\Autodesk\Vault Server 20xx), locate the following two lines:

    !-- slop factor provided to lucene search -->
    
    <add key="SearchSlopFactor" value="10" />
  2. Modify the "SearchSlopFactor" value on the ADMS server to change the results returned by a given search. Depending on the changes you make, you will have a more refined or open set of search results.

    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.

    Note: Keep in mind how these changes affect the user search experience. If the value is too low, users may become frustrated at not finding the correct data. If the value is too high, users may have too many search results to sort through.

Example 1: Searching with Multiple Tokens

Example 2: Searching with Fewer Tokens