Installation Instructions

Preparations

Installation

  1. Make sure that the desired filters are installed and activated by SQL Server. See section Supported File Types.

  2. Create a full-text index on the column dbo.file.data by right clicking the table dbo.file and then 'Full-Text index' -> 'Define Full-Text Index'. This will start a wizard where you should follow the steps below (done in Management Studio 13.0 for a SQL 2008 database):

    • Choose 'pk__file__idfile' as a unique index. Click 'Next >'.
    • The next page in the wizard is for choosing which column to perform full-text searches in. Tick the box for 'data'. In the drop down in the column 'Type column', select 'fileextension'. Also specify your desired language in the column 'Language for Word Breaker'. Click 'Next >'.
    • Select 'Change Tracking'. Choose the option 'Off'. We will later change this setting to 'Automatically' but if there are any preexisting files in the table we first need to perform a full population. Click 'Next >'.
    • Select 'Catalog', 'Index Filegroup' and 'Stoplist'. Tick the box 'Create a new catalog'. Enter the name 'addon_documentsearch'. Let it be Accent sensitive. Click 'Next >'.
    • Define Population Schedules (Optional). Skip this and just click 'Next >'.
    • Full-Text Indexing Wizard Description. Click 'Finish'.
    • When the wizard has completed its work, click 'Close'.
  3. Run the following command to fill the full-text index with information. This will start the population in the background and it might take some time for it to finish if there are a lot of files in the table.

    ALTER FULLTEXT INDEX ON [dbo].[file] START FULL POPULATION;
    
  4. Right click the table dbo.file and then 'Full-Text index' -> 'Track Changes Automatically'. Note that since it might take some time to perform a full population, you might receive an error when trying to do this. Then you have to wait for it to finish and try again. For tips on how to check if it is still running, look here.

  5. Create the SQL function cfn_addon_documentsearch_getoperator.
  6. Create the SQL function cfn_addon_documentsearch_hasoperator.
  7. Create the SQL function cfn_addon_documentsearch_preparesearchstring.
  8. Create the SQL procedure csp_addon_documentsearch_finddocuments.
  9. Restart the LDC manually (right-click on it and click 'Shut down').
  10. Restart the Lime CRM desktop client.
  11. Download the LIP zip file from the latest release.
  12. Enter the VBA editor in the desktop client and run vba lip.InstallFromZip from the immediate window. Select your zip file.
  13. Compile and save the VBA project.
  14. Add the "DocumentSearch" folder from folder apps to the "Actionpads\apps" folder.
  15. In the main actionpad, where you want the app to be shown: Insert one of the two following ways of showing the app. The second is the preferred since it will allow the app to be collapsed and hidden.

    <!-- Use the below for usage without expandable header. -->
    <div data-app="{app:'DocumentSearch', config:{}}"></div>
    
    <!-- Use the below for usage with an expandable header. -->
    <ul class="menu expandable">
        <li class="menu-header" data-bind="text: localize.Addon_DocumentSearch.i_menuHeader"></li>
        <li class="divider"></li>
        <li id="documentsearch-li">
            <div data-app="{app:'DocumentSearch', config:{}}"></div>
        </li>
    </ul>
    
  16. Publish the actionpads.

  17. Restart the Lime CRM desktop client and start using the add-on!
  18. Inform the customer about the GDPR aspects of this add-on. For example, provide them with the information under the GDPR section.
  19. Add a customization record in our own Lime CRM solution under the customer. Note the version installed. Link it to the product card for Document Search.

Install new iFilters

New iFilters could be installed. That requires that the SQL Server is 64-bit if Windows is 64-bit and that you choose the 64-bit version of the filter pack. Follow the instructions below to install new iFilters:

  1. Download and install the iFilter. You can get inspiration from section Filter Pack Suggestions.
  2. After installing the filters, run this to refresh the list.

    EXEC sp_fulltext_service 'update_languages';
    
  3. You will also likely need to refresh the filters and restart the FTS service launcher:

    EXEC sp_fulltext_service 'load_os_resources', 1;
    
    EXEC sp_fulltext_service 'restart_all_fdhosts';
    
  4. Finally, you will need to do a complete rebuild/refresh of any existing full-text indexes that need to use the new filters. Do this by executing the following. Note that a full population will take some time to perform if there are many files in the database.

    ALTER FULLTEXT INDEX ON [dbo].[file] SET CHANGE_TRACKING OFF;
    ALTER FULLTEXT INDEX ON [dbo].[file] START FULL POPULATION;
    
  5. To check if a full population is currently running you could see what the below PAUSE command will generate. If no full population is currently running, then it will say something about not being able to pause anything else besides a full population. If it however does pause it, you must run the RESUME command.

    ALTER FULLTEXT INDEX ON [dbo].[file] PAUSE POPULATION;
    
    ALTER FULLTEXT INDEX ON [dbo].[file] RESUME POPULATION;
    
  6. Then, once it has finished the full population, run the below command.

    ALTER FULLTEXT INDEX ON [dbo].[file] SET CHANGE_TRACKING AUTO;
    

Filter Pack Suggestions

For a filter pack with support for .docx, .msg (also attachments in .msg) and .xlsx, install in two steps the offical Microsoft filter packs on the below links:

For .pdf files a separate iFilter has to be installed. One to use could be this one from Adobe. It is however untested.