cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: Persisting SimpleLuceneQuery [Long]
Date Fri, 29 Oct 2004 12:42:28 GMT

On 29 Oct 2004, at 13:21, Bertrand Delacretaz wrote:

> 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?

Yes <groan> ;)

>> ...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 
> then).

It would definitely complicate matters.

> 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 ;-)

OK ;)

Thanks for this feedback, but I am still not convinced .....

>> ...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.

It was written in OO JS as an exercise in my getting used to that form 
of the language, however, it is now easy to re-code as 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.

I tried once before, but mierably failed to get it to work, here is my 
incentive to try again ;)

>> ...Once again, I would like to express my thanks to Antonio for 
>> offering to help with this...
> We know he's a nice guy ;-)



regards Jeremy

                   If email from this address is not signed
                                 IT IS NOT FROM ME

                         Always check the label, folks !!!!!

View raw message