- Step 1 adapt your aspx
- Step 2 index your pages
- Step 3 install and configure
- Step 4 search with the Sitecore API
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:
- uninstall the light sitecore version
- install the full evaluation version of dtSearch
- launch it
- uninstall this full version
- reinstall the sitecore version
- Launch dtIndexer
- Click on 'Create Index (advanced)...'
- Configure as below
- You may add *.ashx in exclude filter to exclude the handlers
- Click on 'Add web...'
- Add your website url and choose how many level (hyperlink) dtSearch need to browse
- Click on 'Start indexing'
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.
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