Re: [xwiki-commits] r4208 - in xwiki-products/xwiki-enterprise/trunk: . wiki/src/main/resources/Main wiki/src/main/resources/XWiki
Hi JV, On Aug 12, 2007, at 9:13 PM, Jean-Vincent Drean wrote: [snip]
+#if($query != "") + #set($lucene = $xwiki.getPlugin("lucene")) + #if($lucene)
[snip]
+ #else + Error: Lucene plugin not found.
I think it would be nice to tell the user that the Lucene plugin is not enabled in xwiki's configuration and add a link to the old search here. Also what happens if the lucene plugin isn't found? It seems to me the rest of the code below will get executed, no?
+ #end +#end + +#set($doRebuild = $request.getParameter("rebuild")) +#if($doRebuild=="yes") + #set($lucene = $xwiki.getPlugin("lucene")) + #if($lucene) + #set($documentCount = $lucene.rebuildIndex($xwiki,$context)) + #if(${documentCount}>=0) + #info("Started index rebuild with $documentCount documents.\\ + Will take some time depending on the number of pages/attachments.") + #else + #error("Error: Index rebuild failed.") + #end + #end +#else + #if($xwiki.hasAdminRights()) + #info ("[Rebuild the lucene index>${doc.web}.${doc.name}? rebuild=yes]") + #end +#end + +#warning("This is the new lucene search engine.\\ + You can still use the XWiki [default search engine>WebSearch?text=$query]..")</content>
There's an extra dot ("."). Shouldn't this be an "info" rather than a warning? Or it could stay a warning but in that case it might be better to tell the user that this is an experimental feature, WDYT? Thanks -Vincent
participants (1)
-
Vincent Massol