cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <>
Subject Re: Persisting SimpleLuceneQuery [Long]
Date Fri, 29 Oct 2004 12:21:41 GMT
Le 29 oct. 04, à 12:41, Jeremy Quinn a écrit :

> ...What I hope to do is to make the Queries persistable in HSQLDB via 
> ORO...

ORO? That's a regexp package, do you mean OJB instead?

> ...I suppose one of the first questions that needs asking before going 
> ahead and making an Apache ORO equivalent to the above, is : is the 
> structure of the SimpleLuceneQuery/SimpleLuceneQueryBean and 
> SimpleLuceneCriterion/SimpleLuceneCriterionBean as good as it needs to 
> be? Can it be improved? Is it easy enough to extend it? Is the 
> Interface overkill? If it is desirable, is it properly done etc. 
> etc...

One simplification in terms of storage might be to edit the query 
criterion as an XML document and store this as a block in the DB (but I 
don't know how hard it is to get from this XML to Lucene criteria 

It would make the DB model much simpler, and I don't think you're 
running queries on the criterion table anyway, or are you? I imagine 
querying on the user_id, date and name fields only, so I'm not sure if 
the separate criterion table brings something.

Also, considering storage of an XML block keyed by user_id, date and 
name makes it easier to make storage pluggable, allowing file-based 
storage if someone wants it for example.

I don't want to suggest change for the sake of change, but as you're 
asking ;-)

> ...Should QueryFavourites.js be rewritten in Java? Should it be in the 
> style of a DAO?

Dunno about a DAO but it looks like it should - this is not code that 
is going to change often, and it needs to be robust and tested, so I'd 
move it to java.

> ...I guess I need to add a new Block to Cocoon, eek I have never done 
> one !!

It's very easy if you take one of the simplest blocks as a template.

> ...Once again, I would like to express my thanks to Antonio for 
> offering to help with this...

We know he's a nice guy ;-)


View raw message