December 16, 2010

dtSearch : Step 3 install and configure

See also:
Install

First of all you need to download the sitecore package and install it. Normally, they are no problems with this step.
After that, you need to install the dtSearch windows application (a light version provided by sitecore named dtIndexer).
If you have some troubles when you start dtIndexer because a dll is missing of anything else, the work around is:
  1. uninstall the light sitecore version 
  2. install the full evaluation version of dtSearch
  3. launch it
  4. uninstall this full version
  5. reinstall the sitecore version
Add your site

  1.  Launch dtIndexer
  2. Click on 'Create Index (advanced)...'
  3. Configure as below
  4. You may add *.ashx in exclude filter to exclude the handlers
  5. Click on 'Add web...'

  6. Add your website url and choose how many level (hyperlink) dtSearch need to browse
  7. Click on 'Start indexing'
That's all for the configuration of dtSearch himself.

Modify dtSearch.config
To add an index to your web app, you need to modify the file: \App_Config\Include\dtSearch.config
<settings>
 ...

 <!-- Your index -->
 <setting name="dtSearchIndexFolder" value="C:\Program Files (x86)\Sitecore\dtSearch\search\" />
 <setting name="dtSearchIndexName" value="nameOfYourIndex" />

 ...
</settings> 

Adding some custom fields
If you need to index some custom fields, you need to add it in fields.xml.
This file is in the \bin folder of dtSearch (by default something like this: C:\Program Files (x86)\Sitecore\dtSearch\bin\fields.xml)
 Here is an example with 2 custom fields: scProduct and scLang:
<?xml version="1.0" encoding="UTF-8" ?>
<dtSearchTextFieldsDefinitions>
 <Item>
  <Name>scID</Name>
  <Start></Start>
  <End></End>
  <Filters></Filters>
  <LinesToScan>0</LinesToScan>
  <Flags>8</Flags>
 </Item>
 <Item>
  <Name>scPath</Name>
  <Start></Start>
  <End></End>
  <Filters></Filters>
  <LinesToScan>0</LinesToScan>
  <Flags>8</Flags>
 </Item>
 <Item> 
  <Name>scProduct</Name> 
  <Start></Start> 
  <End></End> 
  <Filters></Filters> 
  <LinesToScan>0</LinesToScan> 
  <Flags>8</Flags> 
 </Item> 
 <Item> 
  <Name>scLang</Name> 
  <Start></Start> 
  <End></End> 
  <Filters></Filters> 
  <LinesToScan>0</LinesToScan> 
  <Flags>8</Flags> 
 </Item>
</dtSearchTextFieldsDefinitions> 

It seem that you can also add some custom fields only for one site using the box 'Fields to display in search results' by I never try this method.

1 comment:

  1. I have been using the 2nd method you are talking about. Just adding the fields in the 'Fields to display in search results' textbox also works fine. You can then just pickup the fields just like when you do after adding fields to the xml file.

    ReplyDelete