SID-00216: Search does not look in body
| Status: |
Answered |
TWiki version: |
4.2.4 |
Perl version: |
ActivePerl 820 - Perl 5.8.8 |
| Category: |
CategorySearch |
Server OS: |
Windows XP Professional |
Last update: |
16 years ago |
When entering a string in the search field the results list only include pages where the search string is in the title.
This is when both body and text is selected.
When body only is selected nothing is returned.
This occurs on all webs.
Any help would be gratefully recieved, I'm going to present this to my organisation next week!
--
DominicMortimer - 24 Mar 2009
Discussion and Answer
What are your configuration values related to searching? For a working example on Windows here are mine:
$TWiki::cfg{RCS}{SearchAlgorithm} = 'TWiki::Store::SearchAlgorithms::Forking';
$TWiki::cfg{RCS}{EgrepCmd} = 'D:/GnuWin32/bin/grep -E %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$TWiki::cfg{RCS}{FgrepCmd} = 'D:/GnuWin32/bin/grep -F %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
--
SeanCMorgan - 24 Mar 2009
Many thanks for you quick response
I can't find anything to exactly match this.
In
SourceCode.txt there are the following lines about search
This package has smell factor of *3*
[[TWikiStoreSearchAlgorithmsForkingDotPm][TWiki::Store::SearchAlgorithms::Forking]]
Forking implementation of the RCS cache search.
search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details.
This package has smell factor of *3*
[[TWikiStoreSearchAlgorithmsPurePerlDotPm][TWiki::Store::SearchAlgorithms::PurePerl]]
Pure perl implementation of the RCS cache search.
search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $string. See RcsFile::searchInWebContent for details.
So I think this means it is using pure perl. There are a couple of files relating to this: twiki\data\Twiki\TWikiStoreSearchAlgorithmsPurePerlDotPm.txt C:\www\twiki\lib\TWiki\Store\SearchAlgorithms\PurePerl.pm
However, it sounds like you have managed to get search working using these settings. Could you please let me know in which file the above is specified and the version of
GnuWin32 grep you are using.
The latest version from
http://gnuwin32.sourceforge.net/packages/grep.htm
is 2.5.4
--
DominicMortimer - 25 Mar 2009
Run the configure script in your browser, click on "yes I have read the documentation", open up the Stores Settings section, and look for the {RCS}... settings. Alternatively edit
twiki/lib/LocalSite.cfg directly.
--
PeterThoeny - 25 Mar 2009
Many thanks, search is now working with grep.
One thing I noticed is that search does not work if grep is installed in a directory with spaces.
--
DominicMortimer - 26 Mar 2009
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.