On Aug 8, 2007, at 5:48 PM, Jean-Vincent Drean wrote:
2007/8/8, Vincent Massol <[email protected]>:
Anything more?
I'd like to integrate the Lucene search in XWiki Enterprise for 1.0M4
1.1 M4 :)
release. I've just started working on it but it won't take long thanks to Jens Krämer and Michael Guntli works [1] (thanks!). I could commit it tomorrow afternoon.
We need to decide if we postpone the release for this. IMO this is very important and required new feature so I'm +1 to postpone the release to Friday (I need 1 full day, Friday to perform the release) in order to get this in. In addition this will allow me to work on fixing the code macro issue and we should use the remaining time to ensure the big changes brought by the history table haven't broken anything. What do others think?
Modifications implied by this addition to XE : 1) add of a couple of config lines in xwiki.cfg 2) add some images in dodo/finch/albatross 3) add Main.LuceneSearch to xwiki-product-enterprise wiki 4) add an link in XWiki.WebHome which allow to rebuild the lucene index
Questions : a) where to put the lucene index files ? for the moment I've configured it to put it's indexes in $(appserverRunningDirectory)/logs/lucene/
I suggest the following: 1) We add a new method in XWiki.java (sigh, it'll just be bigger) called getWorkDirectory(). It'll be used by all code that require some work/tmp directories. 2) That method does the following: a) it checks if the work directory is specified in xwiki.cfg file (say with a xwiki.work.dir property) b) if not, then the javax.servlet.context.tempdir attribute of the web application is checked to see if a directory name or a File has already been set. c) if a WEB-INF/work directory exists, it is used directly. d) If a <current dir>/work directory exists, then a temp directory is created within that directory. e) if no other location has been found, a temporary directory is created within the ${java.io.tmpdir} directory. (Note: This is using a strategy similar to Jetty: http:// jetty.mortbay.org/jetty5/faq/faq_s_250-Configuration_t_210tempdir.html) WDYT? Note: I'm not sure about d) but several containers define a work/ directory at the top level directory.
b) do we make the lucene search the default one ?
Unless there are issues with it, I'd say yes.
I'd like to modifiy Panels.Search to make it use the Main.LuceneSearch script. In this case we could keep an information box [2] which permit to re-run the query with Main.WebSearch.
That information box looks like the lucene search isn't working well. I'm fine with putting a message but we need to mention that the lucene search has been recently added and is still under observation for any issue, or something like that and that once the observation period is over it'll be removed. We probably need to explain too in that box that the lucene search is now searching inside attachements for PDF, Word, Excel, etc. and that the indexing is done in a different thread is no longer synchronous with changes (default delay of 20 seconds controlled by such parameter).
WDYT ?
[1] http://www.xwiki.org/xwiki/bin/view/Code/LuceneSearchPage [2] http://www.xwiki.org/xwiki/bin/download/Code/LuceneSearchPage/ result_search_newton.PNG?height=413&width=921
Thanks! -Vincent