Question
I'm having a problem performing searches if the search query contains more than 1 word.
For example I search for "learn", which does return all topics with "learn" in them successfully, however if I search for "learn more" or any other search term of more than 1 word I get a page full of error messages consisting of: -
"Could not perform search, error was: Insecure dependancy in eval while running with a -T switch at D:/Twiki/Website/lib/TWiki/Store/SearchAlgorithms/PurePerl.pm line 51" and "TWiki::Store::SearchAlgoriths::PurePerl::search('learn', 'ARRAY(0x2233e90)', 'HASH(0x243910c)', 'D:/TWiki/Website/Data/Main/', 'TWiki::Sandbox=HASH(0x19c36b0)') called at D:/TWiki/Website/lib/TWiki/Store/RcsFile.pm line 329 TWiki::Store::RcsFile::searchInWebContent"
If I use Forking instead of
PurePerl then I get no results at all though! Looking at the FAQ suggests this may be caused by EGrep and FGrep not being installed properly?
Thanks in advance,
James
Environment
--
JamesRJMorris - 04 Jul 2008
Answer
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.
James, I have a similar configuration like yours (and some time ago a similar problem) and the following worked for me:
- Download the setup file for Grep for Windows
and install it on your sever. I left the proposed path - something like c:\program files\GnuWin32.
- Then update your Windows PATH variable, so that it includes the path to the
bin folder of grep, e.g. c:\progra~1\GnuWin32\bin
- After that update your TWiki configuration file to the following values in the Store section:
-
{RCS}{SearchAlgorithm} > ...::Forking
-
{RCS}{EgrepCmd} > c:\progra~1\GnuWin32\bin\grep.exe -E %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%
-
{RCS}{FgrepCmd} > c:\progra~1\GnuWin32\bin\grep.exe -F %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%
Have also a look at
IndigoPerlCookbook - this is where I got the idea from. Hope it works for you, too.
--
SebastianKlus - 08 Jul 2008
That works brilliantly Sebastian, thanks a lot.
James
--
JamesRJMorris - 09 Jul 2008