Search terms report hit count

This topic describes how to calculate and store the number of terms in a Search Terms Report (STR) that hit on a document.

You can then sort, filter and search for documents based on the number of STR hits, allowing you to prioritize review based on STR hit count or create searches that return documents having a minimum number of STR hits

This workflow requires downloading and installing the Delimiter Count by Saved Search script. To obtain a link for the script, see NSerio / delimiter-count-by-saved-search on GitHub. For more information on adding a script from the library, see Scripts.

Prerequisites

Before calculating and storing hits, you must complete the following steps:

  1. Download the Delimiter Count by Saved Search script. See NSerio / delimiter-count-by-saved-search on GitHub for a link to the script.
  2. Create two STR-specific fields.

Downloading the Delimiter Count by Saved Search script

Your workspace should have this script in the script library. If not, download and install the Delimiter Count by Saved Search script. To obtain a link for the script, see NSerio / delimiter-count-by-saved-search on GitHub. For more information on adding a script from the library, see Scripts.

Add the script to your workspace:

  1. Navigate to and select the Scripts tab.
  2. Click New Relativity Script.
  3. Choose Select from Script Library on the Script Type field.
  4. In the Relativity Script field, click Select, choose the library script you want to add, and click Set.
  5. Click Save.

Creating Search term report fields

You must create two STR-specific fields:

  • STR Hit Terms
  • STR Hit Count

When creating STR Hit Terms, add the following information to the fields:

  • Name=STR Hit Terms
  • Object Type=Document
  • Field Type=Long-text field

When creating STR Hit Count, add the following information to the fields:

  • Name=STR Hit Count
  • Object Type=Document
  • Field Type=Whole Number

Saved search

The next step in the process is to create a saved search that returns the documents that hit on one or more terms for a specific STR.

The STR used must have the Type field set to Report and Tag. See Creating a search terms report. Ensure that the saved search includes the Control Number Identifier (Fixed-length text) and STR Name (Long text).

Then export the results of the saved search. To export the saved search:

  1. Perform an Export to File mass operation on the results.
  2. Select Comma Separated Values (.csv) for the export Format.

The STR terms will be populated in the file as semicolon delimited values.

Import

Now you must use Import/Export to import the saved search. For more information on importing data, see Importing a document load file.

To import the saved search:

  1. Navigate to the Import/Export Job page.
  2. Click New Import/Export Job.
  3. On the Choose Workflow dialog, select Import.
    Import should be selected by default.
  4. Click the Structured (Processed) Data workflow box.
  5. On the Choose the Load File Type dialog, click the Documents box.
  6. On the Choose Load File and Location dialog, complete the fields, and then click Continue.
  7. On the Load File Settings dialog, select the delimiters and encoding values of the load file, and then click Continue.
    The File Column Headers Preview pane will help you to choose the proper settings. For example:
    • File Encoding = Unicode (UTF-8)
    • First Line Contains Column Names = Enabled/Yes
    • Column = , (Comma)
    • Quote = " (Quotation mark; quotes)
    • Newline (Long Text Fields) = LF (Line Feed)
    • Multi-Value = ; (Semicolon)
    • Nested Value = \ (Backslash)
  8. On the Fields Mapping dialog, select the load file fields to import and map them to the corresponding workspace fields, then click Continue. For instance, Control Number Identifier (Fixed-length text) and STR Name (Long text). Alternatively, you can click Auto Map Fields to automatically match fields from the load file to existing workspace fields with the same name.
    Fields without a match will show Choose... in the Workspace Fields column. Select a field from the list.
  9. In the Import Settings dialog, specify the desired line number at which the import process should begin and select the preferred method for importing. For example, you can choose to begin at line 0, use Overlay Only import mode, and select Control Number as the overlay identifier.
  10. Click Import to start the importing process.
  11. Click Close when the importing process is complete.
    If you used Import/Export in web only mode, meaning Express Transfer was not active, do not close the Importing dialog until after the Uploading step has successfully completed. Closing the dialog prior to the Uploading step completing will terminate the import process.
  12. Click Finish to close the dialog.

Run script

Finally, you must run the Delimiter Count by Saved Search script.

  1. Navigate to the Scripts tab in the workspace.
  2. Locate and select the Delimiter Count by Saved Search script.
  3. Click Run Script.
  4. Set the fields in the script pop-up:
    1. Saved Search—The search created above that returns documents where the STR is set.
    2. Source Field—The STR Hit Terms field that was imported above using Import/Export.
    3. Field Delimiter—Enter a semicolon (;).
    4. Count Destination Field—The STR Hit Count field created above. Be aware that this field is only populated when its value is null/blank. It will not be overwritten by the script.
      DelimiterCount
  5. In the Actions console, click Run.

The STR Hit Count field now contains the number of STR terms hitting on each document. You can use the STR Hit Count field in searches and views to sort and filter documents based on the STR Hit Count value.