[opencms-dev] Lucene search module.

Marcus Redeker mredeker at web.de
Sat Aug 23 01:17:02 CEST 2003


Matt,

attached please find a new version of your Lucene module. I implemented
what you where suggesting in number 2) and used your "section" tag which
was commented out to implement this funtionality. You can now specify
for each directory a section name which is used during indexing as a
value for a field called "section". I also updated the SearchHelper so
that you can specify which section should be search. The SearchHelper
simply creates a BooleanQuery with the term "section=<param>" which is
appended to the normal search.

Check it out and let me know what you think. I think we are ready to
have it move from SandboxModule to RealModule!!!

Greetings,

--Marcus



> -----Original Message-----
> From: opencms-dev-admin at opencms.org 
> [mailto:opencms-dev-admin at opencms.org] On Behalf Of M Butcher
> Sent: Wednesday, August 20, 2003 8:49 PM
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] Lucene search module.
> 
> 
> There are ways of doing that with Lucene, and I am currently 
> trying to figure out the best way for a project of mine 
> (which is similar to yours).
> 
> The two that seem the best are:
> 1) Creating separate indices -- this means that each 
> project's data is stored in a separate set of files. This 
> would be a fairly large modification to the code, and would 
> be somewhat complex to configure, but it would accomplish the 
> most thorough separation.
> 
> 2) Use keywords or other built-in Lucene constructs to 
> constrain searches. Lucene supports make a particular match a 
> requirement -- that is, all searches must have keywordA match 
> keywardA_value, and this can be coded directly into the JSP. 
> This is the easiest way to implement a subsite search. As far 
> as the existing code goes, though, I don't have a way to pass 
> that keyword information into the indexer. There should be 
> some parameters like this: <keyword> <name>Subsite</name> 
> <value>myNewSite</value> </keyword>
> 
> The above should be added on a directory-by-directory basis.
> 
> Anyway... those ideas are for the future. For now, you'd 
> probably have to either write a new implementation of 
> I_DocumentHandler or extend the appropriate I_DocumentHandler 
> implementations.
> 
> Matt 
> 
> On Wed, 2003-08-20 at 11:54, Marcus Redeker wrote:
> > Matt,
> > 
> > great work with the search module!!! I was about to make something 
> > myself and than I found yours in the Sandbox!! It works 
> like a charme. 
> > I have one question though: Is it possible to index different 
> > directories and have the search only search within the 
> index for that 
> > one directory? We are having multiple projects within our virtual 
> > filesystem like this:
> > 
> > /project1/....
> > /project2/....
> > 
> > And I don't want the search page in project1 find pages 
> from project2.
> > 
> > 
> > Thanks again,
> > 
> > --Marcus
> > 
> > 
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the 
> list, please 
> > visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> -- 
> M Butcher <mbutcher at grcomputing.net> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenCMSLucene.zip
Type: application/x-zip-compressed
Size: 304436 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20030823/8de977c2/attachment.bin>


More information about the opencms-dev mailing list