lenya-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Content filters
Date Thu, 16 Jul 2009 08:41:59 GMT
Hi Thorsten,

Thorsten Scherler schrieb:
> I need to implement some ContentFiltering widgets for a lenya
> publication. The widgets are basically selects over certain MetaData
> fields on specific resource types.
> Our publication is focused on events of a certain region. You can add
> events to certain categories and later on edit their content. This
> events use meta data that allows filtering like place, start date, end
> date, etc.
> One specific widget is e.g. cities. The containing options are all
> cities of the different events (the duplicates removed). Clicking on the
> filter will result in a listing of all events for that city.
> What is the preferred method in lenya to get all documents of a certain
> resource type?

I guess the most performant way is to use Lucene. The query would be:


See also


A while ago I started to implement a convenient API to do such queries, 
see thread "API for document search" on the users list. Maybe we can 
discuss this again?

> How can I control the caching of the this call, since I can use a cached
> version of the listing until one of the documents get edit?

The Lucene query should be pretty fast, so caching the resulting list 
might not be necessary.

If you don't want to use Lucene, you could write a custom generator that 
stores an index of the relevant meta data and uses the last modification 
date for the cache validity. The generator also has to check the 
sitetree to see if documents have been added or removed. This is a 
rather complex task, but we used it for a customer in Lenya 1.2 and up 
to now it works very well (in combination with mod_cache, though).


-- Andreas

Andreas Hartmann, CTO
BeCompany GmbH
Tel.: +41 (0) 43 818 57 01

To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org

View raw message