[opencms-dev] Using custom Lucene indexes to implement Channels (6a3)

Daniel Rhoden drhoden at iiwinc.com
Tue Feb 8 20:45:18 CET 2005


I am building an art-showcase site for a dear friend at my Church.  
Dealing with her types of 'products' I quickly discovered that an 
implementation of the Channel concept would be appropriate. 

A Channel Situation Example:
Each piece of art will have its own page showcasing various information 
about the piece.  However, there will be different summary pages to 
locate the different types of art.  In this particular situation, a 
single piece of art can be classified differently (multiple channel 
subscription).  Its SUBJECT can be 'still_life', its STYLE can be 
'abstract', its MEDIUM can be 'watercolor', etc.  I want to create 
different summary pages showing me all the art work that is in category 
channel x (for example, show me all art that is 'watercolor').

Implementation Details:
I have extended 4 search package classes to allow me to index custom, 
but specific, vfs resource properties (not just title, keywords, 
description, ...).  This might be useful in its own accord.  However, in 
this situation, I used it to index properties "search_1" through 
"search_10", giving me 10 different classification subjects to index, 
and thus search.  I wanted to leave it general so it could be reused.  
Rather than defining the property "STYLE" and keying in the different 
possible values (realistic, abstract, expressionist_contemporary, 
impressionist, experimental) for that art page, I just write down that 
property "search_2" will be used to track the art's STYLE.  When it 
comes time to built an overview page showing me all the art that is 
impressionist, my custom 'search' (no user input) page looks only in the 
field 'search_2' of its index for the exact phrase that I use to 
indicate that style ('impressionist' in this case).  Boom, I get the 
List of art that the user is looking for on the Style summary page.  The 
"channels" folder is never used.

I would love to get some feedback on this concept.  My classes work and 
I am happy to share them for further development (if determined 
practical/useful).

Thanks,

Daniel Rhoden





More information about the opencms-dev mailing list