Hi, because I needed a lucene search module really quickly, and the mmapps lucene serach was not to my satisfaction (it has a few really nasty problems), I write my won version of a lucene module.
I dropped it in the speeltuin cvs under gomez/lucene.


It currently includes full index at startup (not very nice, but currently used for debugging) or on demand, incremental index, and a basic search facility. I will likely need more fucntionality, but this is the basics.
The main diferrence with the mmapps lucene (the old version) is the incremental index, the way the config file is read (no need any more for 4 jars just to read your xml), and the use of the function framework.


The latter means you can do a search like this:


<%@ taglib uri="http://www.mmbase.org/mmbase-taglib-1.0"; prefix="mm" %> <mm:cloud> <mm:import externid="value"/>

  <form action="search.jsp" method="post">
    <input name="value"/>
    <input type="submit" />
  </form>

  <mm:present referid="value" >
    <mm:nodelistfunction module="lucene" name="search" referids="value">
    <mm:first>
      search: <mm:write referid="value" /><br />
      hits: <mm:size /><br />
    </mm:first>
    <p><mm:function name="gui" /></p>
    </mm:nodelistfunction>
  </mm:present>

</mm:cloud>


There are some things this lucene module doesn't support (in comparisson to the mmapps one): indexing on relations for instance. I may add that later, it is not actually a bad idea.
The fullindex option uses incremental nodelists (so avoids memory problems).
The implementation currently uses core classes rather that bridge classes (the function framework later changes this to bridge nodes). I may change that later if needed.


Note that this is 1.8 code, and as cutting-edge as you can get.
If you want to run this with 1.7 you'll need a number of changes.

Anyway, this is up so people know that I am working on this.
I heared Finalist is working on another version, too.
Perhaps code can be combined.

--
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"Some Drink at the Fountain of Knowledge. Others Just Gurgle."

_______________________________________________
Developers mailing list
[EMAIL PROTECTED]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to